Created attachment 239188 [details] upgrade to ROOT v6.26/10 - Release notes at https://root.cern/doc/v626/release-notes.html#release-6.2610 - Port now compiles against C++17 - Added build of ROOT v7 preview features as default build option A fork of the ROOT project repo (https://github.com/root-project/root) with *.orig files, patch files and a short README is located here: https://github.com/eamjensen/root-fbsd
Hi Erik, Is this patch correct? The diff seems to mark as changed lines that actually don't change: @@ -1,66 +1,68 @@ -PORTNAME= root <---- -DISTVERSION= 6.26.06 -CATEGORIES= devel science math parallel python -MASTER_SITES= https://root.cern/download/ -DISTFILES= ${PORTNAME}_v${DISTVERSION}.source${EXTRACT_SUFX} +PORTNAME= root <---- +DISTVERSION= 6.26.10 +CATEGORIES= devel science math parallel python +MASTER_SITES= https://root.cern/download/ +DISTFILES= ${PORTNAME}_v${DISTVERSION}.source${EXTRAC
PORTNAME= root (tab) PORTNAME= root (spaces) It seams that tabs where replaced with spaces maybe by text editor.
Setting CMAKE_ARGS= -DCMAKE_CXX_STANDARD=17 will enable root7 by default, so option ROOT7 will have no effect. Sugestion is using flavor root{-root7}: - default flavor: root - second flavour: root-root7 pkg-plist will be different for both. Or use CMAKE_ARGS= -DCMAKE_CXX_STANDARD=14 (minimum required) for normal version and CMAKE_ON= root7 for option ROOT7
from https://root.cern/install/build_from_source/#enabling-experimental-features-aka-root7 --- Enabling experimental features, aka ROOT7Permalink New and improved versions of standard ROOT components are being implemented under codename ROOT7. Turning on C++17 (or C++14 until v6.24; see Setting the C++ standard) or higher will automatically enable ROOT7. Alternatively, you can explicitly enable ROOT7 with -Droot7=ON, which will in turn set the standard to C++17 (or C++14 until v6.24) if a value was not already specified by the user. ---
(In reply to Nuno Teixeira from comment #3) Hi Nuno :-) Based on the documentation, I also expect ROOT7 to be automatically enabled when C++17 is chosen as standard, but in actuality, when I run `poudriere testport` on this patch, this only happens when I also let OPTIONS_DEFAULT= ROOT7 in the Makefile. If I comment this line out, but leave everything else as it is in the Makefile, "OPTIONS_DEFINE= DOCS ROOT7", then C++17 is the compilation standard, but ROOT7 is not enabled. Final few lines of output from CMake config step with C++17 and ROOT7 enabled: "-- Enabled support for: asimage builtin_clang builtin_cling builtin_ftgl builtin_gl2ps builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_xxhash dataframe exceptions fftw3 fitsio gdml gnuinstall http imt mathmore mlp minuit2 mysql opengl pgsql pyroot roofit webgui root7 rpath runtime_cxxmodules shared soversion sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt x11 xml xrootd" Final few lines of output from CMake config step with C++17 and ROOT7 disabled: "-- Enabled support for: asimage builtin_clang builtin_cling builtin_ftgl builtin_gl2ps builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_xxhash dataframe exceptions fftw3 fitsio gdml gnuinstall http imt mathmore mlp minuit2 mysql opengl pgsql pyroot roofit webgui root7 rpath runtime_cxxmodules shared soversion sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt x11 xml xrootd"
(In reply to Nuno Teixeira from comment #3) Anyway, this idea of using flavors could still be interesting. Which solution do you prefer, if the current Makefile and pkg-plist combination otherwise works?
(In reply to Nuno Teixeira from comment #2) By the way, maybe I have missed the place where this is written down, but is the convention generally to have a single tab, only and always, after every "=" in port Makefiles? And continued lines are then adjusted to match the indentation of the assignment?
(In reply to Erik Jensen from comment #6) 2 flavours will build 2 pkgs. With options only one pkg will be built based on options defauld.
(In reply to Erik Jensen from comment #7) One tab usually is enough, but sometimes 2 tabs for cosmetic (portfmt).
(In reply to Erik Jensen from comment #5) OK, if that works fine and it build root7 and normal with c++17 independent then we good.
(In reply to Erik Jensen from comment #0) Editing ports files could not modify original formating or diff will be shown to modify all lines, e.g., Makefile. You should edit and change only parameters that are really needed, keeping original formating unchanged. Please send a corrected diff so I can test. I will do further testing on flavours after that to see if it applies good to this port. I usually use flavours when port support qt5/qt6, gtk2/gtk3/gtk4, same port with different base support, need to check if it applies correctly to a normal/+experimental features port. But OPTION= root7 is the most correct way for this case. Cheers
(In reply to Nuno Teixeira from comment #11) I will send a corrected diff soon. In the meantime, I have received some emails from pkg-fallout regarding build of root v6.26.06 on 123amd64 and 131arm64, so I will debug this and include it in my corrected diff. Again, the version of LLVM/Clang on FreeBSD 12 has a few special cases that need handling, and fixing the port to build on arm64 might be a lot easier than I could otherwise have feared :-)
(In reply to Erik Jensen from comment #12) 12.3 is eoled but still used in pkg builders. Port was tested OK on 12.4{amd64,i386} with updated clang 13.0.0: (12.4 Release Notes: The LLVM toolchain suite has been updated to version 13.0.0. 838e2fa19531) Nice to hear! Waiting for your patch.
Created attachment 239343 [details] devel_root02.diff upgrade to ROOT v6.26/10 plus a few port fixes - Release notes at https://root.cern/doc/v626/release-notes.html#release-6.2610 - Port now compiles against C++17 - Added build of ROOT v7 preview features as default build option - Added dependencies on devel/nlohmann-json, graphics/ftgl, print/gl2ps and devel/xxhash so ROOT does not use builtin versions of these libraries - ROOT now builds on FreeBSD 12.3 (uses LLVM/Clang 10.0.1) -- a bit of .modulemap hacking was necessary; tested in poudriere jail on my own system - ROOT *should* build on arm64 -- some files are not installed on arm64 and some files are named differently (re: https://pkg-status.freebsd.org/ampere3/data/131arm64-default/33c48239fb6d/logs/root-6.26.06.log) A fork of the ROOT project repo (https://github.com/root-project/root) with *.orig files, patch files and a short README is located here: https://github.com/eamjensen/root-fbsd
124amd64: clang 13.0.0 ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: lib/root/std_config.pcm # File only installed with LLVM/Clang 13 (used on FreeBSD 13) .if 1299999 < ${OSVERSION} && ${OSVERSION} < 1400000 PLIST_FILES+= lib/root/std_config.pcm .endif Should be changed to: # File only installed with LLVM/Clang 13 (used on FreeBSD 12.4 and 13.x) .if 1204000 <= ${OSVERSION} && ${OSVERSION} < 1400000 PLIST_FILES+= lib/root/std_config.pcm .endif Could you check it? No need to upload a new diff
(In reply to Nuno Teixeira from comment #15) Yes, you are completely right. I saw your comment #13 regarding FreeBSD 12.3 and 12.4, but forgot to handle this properly in the Makefile. Actually, I also realised, after submitting the new diff, that if the port is built with LLVM/Clang 13 on arm64, then this single .pcm file should be renamed accordingly. So a final modification would be # File only installed with LLVM/Clang 13 (used on FreeBSD 12.4 and 13.x) .if (1299999 < ${OSVERSION} && ${OSVERSION} < 1400000) PLIST_FILES+= lib/root/std_config${AARCH64_PCM_SUFFIX}.pcm .endif Just tested in a poudriere jail on 12.4, and it builds.
(In reply to Erik Jensen from comment #16) Sorry! I meant: # File only installed with LLVM/Clang 13 (used on FreeBSD 12.4 and 13.x) .if 1204000 <= ${OSVERSION} && ${OSVERSION} < 1400000 PLIST_FILES+= lib/root/std_config${AARCH64_PCM_SUFFIX}.pcm .endif
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e9e0b380a1ec9ac63ca76da8bc5d9c38e49d38d4 commit e9e0b380a1ec9ac63ca76da8bc5d9c38e49d38d4 Author: Erik Jensen <erik@tenku.dk> AuthorDate: 2023-01-10 09:06:11 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2023-01-10 09:15:46 +0000 devel/root: Update to 6.26/10 - Port now compiles against C++17 - Added build of ROOT v7 preview features as default build option - Added dependencies on devel/nlohmann-json, graphics/ftgl, print/gl2ps and devel/xxhash so ROOT does not use builtin versions of these libraries - ROOT now builds on FreeBSD 12.3 (uses LLVM/Clang 10.0.1) -- a bit of .modulemap hacking was necessary; tested in poudriere jail on my own system - ROOT *should* build on arm64 -- some files are not installed on arm64 and some files are named differently ChangeLog: https://root.cern/doc/v626/release-notes.html#release-6.2610 PR: 268701 devel/root/Makefile | 57 +- devel/root/distinfo | 6 +- devel/root/pkg-plist | 1565 ++++++++++++++++++-- .../remove-modules-from-modulemap.sh (new +x) | 27 + 4 files changed, 1503 insertions(+), 152 deletions(-)
Committed, thanks!