Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/root-ci-config/build_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def run_ctest(extra_ctest_flags: str) -> int:
builddir = os.path.join(WORKDIR, "build")
ctest_result = subprocess_with_log(f"""
cd '{builddir}'
ctest --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags}
ctest -R "roottest-root-hist-h2root" --output-on-failure --parallel {os.cpu_count()} --output-junit TestResults.xml {extra_ctest_flags}
""")

return ctest_result
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/root-ci-config/buildconfig/mac14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ builtin_xxhash=ON
builtin_zeromq=ON
builtin_zstd=ON
cocoa=ON
fortran=OFF
minuit2_omp=OFF
test_distrdf_dask=OFF
test_distrdf_pyspark=OFF
Expand Down
29 changes: 19 additions & 10 deletions hist/hbook/src/THbookFile.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ static Int_t gLastEntry = -1;
# define type_of_call
# define DEFCHAR const char*
# define PASSCHAR(string) string

// As recommended in
// https://gcc.gnu.org/onlinedocs/gfortran/Argument-passing-conventions.html
#if __GNUC__ > 7
typedef size_t fortran_charlen_t;
#else
typedef int fortran_charlen_t;
#endif

#else
# define hlimit HLIMIT
# define hldir HLDIR
Expand Down Expand Up @@ -177,8 +186,8 @@ static Int_t gLastEntry = -1;
extern "C" void type_of_call hlimit(const int&);
#ifndef WIN32
extern "C" void type_of_call hropen(const int&,DEFCHAR,DEFCHAR,DEFCHAR,
const int&,const int&,const int,const int,const int);
extern "C" void type_of_call hrend(DEFCHAR,const int);
const int&,const int&,fortran_charlen_t,fortran_charlen_t,fortran_charlen_t);
extern "C" void type_of_call hrend(DEFCHAR,fortran_charlen_t);
#else
extern "C" void type_of_call hropen(const int&,DEFCHAR,DEFCHAR,DEFCHAR,
const int&,const int&);
Expand All @@ -189,7 +198,7 @@ extern "C" void type_of_call hrin(const int&,const int&,const int&);
extern "C" void type_of_call hnoent(const int&,const int&);
#ifndef WIN32
extern "C" void type_of_call hgive(const int&,DEFCHAR,const int&,const float&,const float&,
const int&,const float&,const float&,const int&,const int&,const int);
const int&,const float&,const float&,const int&,const int&,fortran_charlen_t);
#else
extern "C" void type_of_call hgive(const int&,DEFCHAR,const int&,const float&,const float&,
const int&,const float&,const float&,const int&,const int&);
Expand All @@ -198,24 +207,24 @@ extern "C" void type_of_call hgive(const int&,DEFCHAR,const int&,const float&,c
//SUBROUTINE HGNT1(IDD,BLKNA1,VAR,IOFFST,NVAR,IDNEVT,IERROR)
#ifndef WIN32
extern "C" void type_of_call hgiven(const int&,DEFCHAR,const int&,DEFCHAR,
const float&,const float&,const int,const int);
extern "C" void type_of_call hgnt1(const int&,DEFCHAR,DEFCHAR,const int&,const int&,const int&,const int&,const int,const int);
const float&,const float&,fortran_charlen_t,fortran_charlen_t);
extern "C" void type_of_call hgnt1(const int&,DEFCHAR,DEFCHAR,const int&,const int&,const int&,const int&,fortran_charlen_t,fortran_charlen_t);
#else
extern "C" void type_of_call hgiven(const int&,DEFCHAR,const int&,DEFCHAR,
const float&,const float&);
extern "C" void type_of_call hgnt1(const int&,DEFCHAR,DEFCHAR,const int&,const int&,const int&,const int&);
#endif

#ifndef WIN32
extern "C" void type_of_call hntvar2(const int&,const int&,DEFCHAR,DEFCHAR,DEFCHAR,int&,int&,int&,int&,int&,const int,const int, const int);
extern "C" void type_of_call hntvar3(const int&,const int&,DEFCHAR, const int);
extern "C" void type_of_call hntvar2(const int&,const int&,DEFCHAR,DEFCHAR,DEFCHAR,int&,int&,int&,int&,int&,fortran_charlen_t,fortran_charlen_t, fortran_charlen_t);
extern "C" void type_of_call hntvar3(const int&,const int&,DEFCHAR, fortran_charlen_t);
#else
extern "C" void type_of_call hntvar2(const int&,const int&,DEFCHAR,DEFCHAR,DEFCHAR,int&,int&,int&,int&,int&);
extern "C" void type_of_call hntvar3(const int&,const int&,DEFCHAR);
#endif

#ifndef WIN32
extern "C" void type_of_call hbnam(const int&,DEFCHAR,const int&,DEFCHAR,const int&,const int, const int);
extern "C" void type_of_call hbnam(const int&,DEFCHAR,const int&,DEFCHAR,const int&,fortran_charlen_t, fortran_charlen_t);
#else
extern "C" void type_of_call hbnam(const int&,DEFCHAR,const int&,DEFCHAR,const int&);
#endif
Expand All @@ -237,8 +246,8 @@ extern "C" void type_of_call hix(const int&,const int&,const float&);
extern "C" void type_of_call hijxy(const int&,const int&,const int&,const float&,const float&);
extern "C" float type_of_call hije(const int&,const int&,const int&);
#ifndef WIN32
extern "C" void type_of_call hcdir(DEFCHAR,DEFCHAR ,const int,const int);
extern "C" void type_of_call hldir(DEFCHAR,DEFCHAR ,const int,const int);
extern "C" void type_of_call hcdir(DEFCHAR,DEFCHAR ,fortran_charlen_t,fortran_charlen_t);
extern "C" void type_of_call hldir(DEFCHAR,DEFCHAR ,fortran_charlen_t,fortran_charlen_t);
#else
extern "C" void type_of_call hcdir(DEFCHAR,DEFCHAR);
extern "C" void type_of_call hldir(DEFCHAR,DEFCHAR);
Expand Down
1 change: 0 additions & 1 deletion main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ generateHeader(hadd

if(fortran AND CMAKE_Fortran_COMPILER)
ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern CMAKENOEXPORT)
set_target_properties(g2root PROPERTIES COMPILE_FLAGS "-w")
ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern CMAKENOEXPORT)

# This is needed in particular for macOS, where the path of the GNU Fortran
Expand Down
4 changes: 2 additions & 2 deletions main/src/h2root.cxx
Copy link
Collaborator Author

@ferdymercury ferdymercury Nov 28, 2025

Choose a reason for hiding this comment

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

@guitargeek maybe this change in h2root.cxx (i mean the last commit with DEFCHAR) also makes sense? If yes feel free to do a separate PR on master, but I guess we need ifdef win32 else ... On top.

Anyway it does not solve the crash

Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ extern "C" void type_of_call hbnam(const int&,DEFCHAR,const int&,DEFCHAR,const
#endif

extern "C" void type_of_call hprntu(const int&);
extern "C" void type_of_call hgnpar(const int&,const char *,const int);
extern "C" void type_of_call hgnpar(const int&,DEFCHAR,fortran_charlen_t);
extern "C" void type_of_call hgnf(const int&,const int&,const float&,const int&);
extern "C" void type_of_call hgnt(const int&,const int&,const int&);
extern "C" void type_of_call rzink(const int&,const int&,const char *,const int);
extern "C" void type_of_call rzink(const int&,const int&,DEFCHAR,fortran_charlen_t);
extern "C" void type_of_call hdcofl();
extern "C" void type_of_call hmaxim(const int&,const float&);
extern "C" void type_of_call hminim(const int&,const float&);
Expand Down
8 changes: 2 additions & 6 deletions misc/minicern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@ ROOT_LINKER_LIBRARY(minicern *.c *.f TYPE STATIC)
set_property(TARGET minicern PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(minicern ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})

# Disable optimization since it some cases was causing crashes.
# Disable warnings, since what has worked for 40 years...
# (see https://sft.its.cern.ch/jira/browse/ROOT-9179 for the warnings)
set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-O0 -w")
# set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address")
# target_link_options(minicern BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address)
# set_target_properties(minicern PROPERTIES COMPILE_FLAGS "-fsanitize=undefined -fsanitize=address") # TODO enabling this shows issues
# target_link_options(minicern BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) # TODO enabling this shows issues
Loading
Loading