Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d2011b2
add go4 recipe
HLinde Jun 11, 2025
b2d1965
remove explicit python variants
HLinde Jun 11, 2025
78053da
skip win and osx builds for now
HLinde Jun 11, 2025
16026b1
fix homepage link
HLinde Jun 16, 2025
c5a0cee
Merge branch 'main' into go4
HLinde Aug 3, 2025
2125d9a
Merge branch 'main' into go4
HLinde Sep 1, 2025
1d3d45a
clean up recipe
HLinde Sep 5, 2025
45a8a4b
Merge branch 'conda-forge:main' into go4
HLinde Sep 5, 2025
6278357
Merge remote-tracking branch 'refs/remotes/origin/go4' into go4
HLinde Sep 5, 2025
8f32b0e
add python to run dependencies again
HLinde Sep 5, 2025
5994ab4
Merge branch 'conda-forge:main' into go4
HLinde Nov 8, 2025
ff07f5d
add GO4License.txt to recipe
HLinde Nov 9, 2025
9a6fd10
Add comment on ${{ compiler('cxx') }} resolution for the test environ…
HLinde Nov 9, 2025
1bbc01e
try building on osx
HLinde Nov 9, 2025
9f7aa7c
only use libgl-devel host dependency on linux
HLinde Nov 9, 2025
4a29c35
remove globstar shell option for osx build
HLinde Nov 9, 2025
0cde1c5
clean up and avoid using globstar as osx does not support it
HLinde Nov 9, 2025
f1e91a4
try different sed commands for osx
HLinde Nov 10, 2025
c1f351b
try if cleanup is even necessary at all anymore
HLinde Nov 11, 2025
747b00f
add osx libSystem.B.dylib to allowlist
HLinde Nov 11, 2025
09a8700
remove the sed cleanups as they do not seem necessary any more
HLinde Nov 11, 2025
83cd7f3
adjust test requirements for osx
HLinde Nov 11, 2025
3c76357
try again on osx without compiler macro
HLinde Nov 12, 2025
cc49fa7
clean up
HLinde Nov 12, 2025
72d701e
further cleanup
HLinde Nov 24, 2025
0f14530
patch compiler selection in Go4s Makefile.Linux
HLinde Nov 24, 2025
eabc565
adjust cmake invocation to conda-forge
HLinde Nov 24, 2025
c0b33b9
build on of the test cases with cmake
HLinde Nov 25, 2025
3dc0f59
try matching the library on both linux / osx
HLinde Nov 25, 2025
6446e96
set extglob for test examples
HLinde Nov 25, 2025
4587bf0
remove special settings for dynamic_linking
HLinde Dec 13, 2025
67f50d5
try using CMAKE_ARGS.. but leads to errors
HLinde Dec 13, 2025
ab29662
Merge branch 'main' into go4
HLinde Dec 13, 2025
dd37f65
use CMAKE_ARGS
HLinde Dec 15, 2025
fa5bd61
use CPU_COUNT parameter instead of trying to call nproc
HLinde Jan 5, 2026
876b711
remove manual pins
HLinde Jan 5, 2026
02732c6
patch lipthread linking
HLinde Jan 5, 2026
46527b0
take DCMAKE_INSTALL_LIBDIR out of CMAKE_ARGS
HLinde Jan 5, 2026
938a7b5
adjust patches to docker building
HLinde Jan 5, 2026
5973ffd
Merge branch 'main' into go4
HLinde Jan 6, 2026
f73abb3
handle linking issues only on linux
HLinde Jan 6, 2026
6314eb4
remove CMAKE argument with pattern mattching instead of array position
HLinde Jan 6, 2026
eda6e81
fix cmake argument expansion in example runs
HLinde Jan 6, 2026
4ec7158
Merge branch 'main' into go4
HLinde Mar 3, 2026
a5c362e
Merge remote-tracking branch 'refs/remotes/origin/go4' into go4
HLinde Mar 3, 2026
7a814a8
remove optional hdf5
HLinde Mar 3, 2026
ce0e756
explicitly turn hdf5 feature off
HLinde Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 232 additions & 0 deletions recipes/go4/LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions recipes/go4/activate-go4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# preserve the user's existing setting
if [ ! -z "${GO4SYS+x}" ]; then
export CONDA_BACKUP_GO4SYS="${GO4SYS}"
fi
if [ ! -z "${ROOT_INCLUDE_PATH+x}" ]; then
export CONDA_BACKUP_ROOT_INCLUDE_PATH="${ROOT_INCLUDE_PATH}"
fi

export GO4SYS="${CONDA_PREFIX}"
export PYTHONPATH=$GO4SYS/python:$PYTHONPATH
export ROOT_INCLUDE_PATH="${CONDA_PREFIX}/include":$ROOT_INCLUDE_PATH
29 changes: 29 additions & 0 deletions recipes/go4/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -eumx -o pipefail
shopt -s failglob
shopt -s globstar

echo $PREFIX
echo $PKG_NAME
echo $SRC_DIR
echo $PWD
echo $BUILD_PREFIX
ls -lah $SRC_DIR

mkdir -p $PREFIX
Comment thread
HLinde marked this conversation as resolved.
Outdated

cmake $SRC_DIR -Dexamples=OFF -DCMAKE_INSTALL_PREFIX=${PREFIX}
make -j$(nproc)
make install
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make install
cmake -B build -S ${SRC_DIR} -Dexamples=OFF ${CMAKE_ARGS}
cmake --build build -j${CPU_COUNT}
cmake --install build

This is our preferred way to invoke cmake - note that ${CMAKE_ARGS} is mandatory and must come at the end of the invocation, though arguments in ${CMAKE_ARGS} can be modified or removed as necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake -B build -S "${SRC_DIR}" -Dexamples=OFF -DCMAKE_INSTALL_PREFIX=${PREFIX} "${CMAKE_ARGS}"
cmake --build build -j"${CPU_COUNT}"
cmake --install build

I have it now like this. Or should the DCMAKE_INSTALL_PREFIX already come with ${CMAKE_ARGS}? When I tried without that argument it tried to install to the system directories.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCMAKE_INSTALL_PREFIX should normally be in ${CMAKE_ARGS}. I'll do a local test for this to see if that isn't working.

Copy link
Copy Markdown
Contributor Author

@HLinde HLinde Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that I actually didn't apply ${CMAKE_ARGS} properly. "${CMAKE_ARGS}" ended up as '-DCMAKE_AR=$BUILD_PREFIX/bin/x86_64-conda-linux-gnu-ar ...' That's why I had to set the variable.
However, now that I fixed this, I get now a missing library: /usr/lib64/libpthread_nonshared.a

 │ │ [ 79%] Linking CXX shared library lib/libGo4AnalBase.so
 │ │ $BUILD_PREFIX/bin/../libexec/gcc/x86_64-conda-linux-gnu/14.3.0/ld: cannot find /usr/lib64/libpthread_nonshared.a: No such file or directory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried merging the conda-forge/staged-recipes/main branch into this one, but on my local machine it is still the same problem.


cd $PREFIX
CHANGES="activate deactivate"
for CHANGE in $CHANGES; do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/${CHANGE}-go4.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${CHANGE}-${PKG_NAME}.sh"
done

export PYTHONPATH=""
export ROOT_INCLUDE_PATH=""
now_change="activate"
source "${PREFIX}/etc/conda/${now_change}.d/${now_change}-${PKG_NAME}.sh"
21 changes: 21 additions & 0 deletions recipes/go4/clean_up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -eumx -o pipefail
shopt -s globstar

echo $PREFIX
echo $PKG_NAME
echo $SRC_DIR
echo $PWD
echo $BUILD_PREFIX

pushd $PREFIX
tmp_prefixes="${BUILD_PREFIX} ${SRC_DIR}"
for replace_prefix in $tmp_prefixes; do
echo "${replace_prefix}"
sed -i "s|${replace_prefix}|${PREFIX}|g" **/*.h
sed -i "s|${replace_prefix}|${PREFIX}|g" **/*.cmake
sed -i "s|${replace_prefix}|${PREFIX}|g" **/*.txt
sed -i "s|${replace_prefix}|${PREFIX}|g" **/*Makefile*
sed -i "s|${replace_prefix}|${PREFIX}|g" go4login
done
popd
17 changes: 17 additions & 0 deletions recipes/go4/deactivate-go4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# reinstate the backup from outside the environment
if [ ! -z "${CONDA_BACKUP_GO4SYS}" ]; then
export GO4SYS="${CONDA_BACKUP_GO4SYS}"
unset CONDA_BACKUP_GO4SYS
# no backup, just unset
else
unset GO4SYS
fi
if [ ! -z "${CONDA_BACKUP_ROOT_INCLUDE_PATH}" ]; then
export ROOT_INCLUDE_PATH="${CONDA_BACKUP_ROOT_INCLUDE_PATH}"
unset CONDA_BACKUP_ROOT_INCLUDE_PATH
# no backup, just unset
else
unset ROOT_INCLUDE_PATH
fi
94 changes: 94 additions & 0 deletions recipes/go4/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
context:
name: Go4
Comment thread
HLinde marked this conversation as resolved.
Outdated
version: '6.4.1'

package:
name: ${{ name|lower }}
Comment thread
HLinde marked this conversation as resolved.
Outdated
version: ${{ version }}

source:
url: https://github.com/gsi-ee/go4//releases/download/${{ version }}/go4-${{ version }}.tar.gz
sha256: d4c4409b4a86e8686ac19a040824fc37f8ad9bdeef27545cb405b777025e12ee

build:
number: 0
skip:
- win
- osx
Comment thread
HLinde marked this conversation as resolved.
Outdated
script:
- if: unix
then:
- "${RECIPE_DIR}/build.sh"
- "${RECIPE_DIR}/clean_up.sh"
dynamic_linking:
overdepending_behavior: "error" # (defaults to "ignore")
overlinking_behavior: "error" # (defaults to "ignore")

requirements:
build:
- cmake
- make
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- ${{ compiler('cxx') }}
- libgl-devel
Comment thread
HLinde marked this conversation as resolved.
Outdated
host:
# conda-forge pins root_base 6.32 and 6.34 as variants
# however root_base 6.32 is pinned to gcc version 13, but gcc is pinned to 14
- root_base 6.34.*
Comment thread
HLinde marked this conversation as resolved.
Outdated
- qt
- hdf5
- python
run:
- python

tests:
- package_contents:
bin:
- go4
- go4analysis
- script:
- ./run_go4_examples.sh
files:
source:
- Go4ExampleSimple/
- Go4ExampleUserSource/
recipe:
- run_go4_examples.sh
requirements:
run:
- cmake
- make
# works:
- gxx
# But:
# - ${{ compiler('cxx') }}
# Doesn't work:
# │ make: g++: No such file or directory
# │ make: *** [$PREFIX/Makefile.rules:50: TXXXProc.o] Error 127
Comment thread
HLinde marked this conversation as resolved.
Outdated

about:
homepage: https://www.gsi.de/en/work/research/experiment_electronics/data_processing/data_analysis/the_go4_home_page
summary: |
The object-oriented system Go4 (GSI Object Oriented On-line Off-line system)
is based on ROOT (R. Brun et al.) with the specific requirements of the low
and medium energy nuclear and atomic physics experiments implemented as extensions.
description: |
Go4 separates analysis and GUI in two tasks which could run on different nodes.
Communication is done through threads and sockets. The GUI is built with the
Qt widget library using the Qt designer. Qt and ROOT are interfaced by QtROOT.
Full ROOT functionality including menus and graphics is available without modifications.
The Go4 analysis framework provides the syntax to organize the analysis in steps
which can be controlled from the GUI. Each step has its own IO and processing classes.
The Go4 event classes can be used to construct at runtime complex (composite) events which
are stored by Go4 in trees and branches without explicit programming. The Go4 GUI includes
a browser and tree viewer which can be used without analysis to process standard ROOT files.
The tree viewer resolves arbitrary hierarchy levels of composite event trees.
license: GPL-3.0-or-later
license_file: LICENSE
Comment thread
HLinde marked this conversation as resolved.
Outdated
documentation: https://www.gsi.de/en/work/research/experiment_electronics/data_processing/data_analysis/the_go4_home_page/documentation
repository: https://github.com/gsi-ee/go4

extra:
recipe-maintainers:
- HLinde
19 changes: 19 additions & 0 deletions recipes/go4/run_go4_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -eumx -o pipefail
shopt -s failglob
shopt -s globstar
echo $GO4SYS
echo $PREFIX

pushd Go4ExampleSimple
make clean
make all -j$(nproc)
go4analysis -random -number 100000
popd

pushd Go4ExampleUserSource
make clean
make all -j$(nproc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pushd Go4ExampleSimple
make clean
make all -j$(nproc)
go4analysis -random -number 100000
popd
pushd Go4ExampleUserSource
make clean
make all -j$(nproc)
pushd Go4ExampleSimple
make clean
make CXX=${CXX} all -j$(nproc)
go4analysis -random -number 100000
popd
pushd Go4ExampleUserSource
make clean
make CXX=${CXX} all -j$(nproc)

Can you check if this allows you to remove gxx from the test dependencies on Linux? In many cases the make file just needs to be "force-fed" CXX even though we explicitly define it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint! It turned out, go4 doesn't read the CXX variable at all and hard-codes CXX=g++ or CXX=clang++ here: https://github.com/gsi-ee/go4/blob/a7decc810838fbd1e3ac63fb2741f42c88e72a7d/build/Makefile.Linux#L9

I patched it here in the recipe and now the tests run without any further dependencies.
This explains the linux case, however the osx case is working with the hard CXX=clang++ setting. I would guess clang++ is available from the osx image?

go4analysis -user tafoil50.scf
go4analysis -user befoil50.scf
popd