Trying to build my project which uses CINT with gcc-13.2 on Ubuntu

CINT Version: 5.18.00
Platform: Ubuntu 24.04
Compiler: gcc-13.2

I am trying to build my project which uses CINT on Ubuntu with gcc-13.2. While building the project, CINT generates a .cxx file, and my gcc-13.2 complains while compiling this .cxx file with the below 2 errors:

[build] /home/test/Prabhu/FinalUbuntuTest/mst_msvp/Code/MSVP/Common_Lib/LibCint/cint/src/G__cpp_SVP.cxx:5720:131: **error: ‘std::__cxx11::list<unsigned char*>::iterator’ has no member named ‘operator==’; did you mean ‘operator=’?**
[build]  5720 |       G__letint(result7, 103, (long) ((list<unsigned char*,allocator<unsigned char*> >::iterator*) G__getstructoffset())->operator==(*(list<unsigned char*,allocator<unsigned char*> >::iterator*) libp->para[0].ref));

[build] /home/test/Prabhu/FinalUbuntuTest/mst_msvp/Code/MSVP/Common_Lib/LibCint/cint/src/G__cpp_SVP.cxx: In function ‘int G___432_0_11(G__value*, const char*, G__param*, int)’:
[build] /home/test/Prabhu/FinalUbuntuTest/mst_msvp/Code/MSVP/Common_Lib/LibCint/cint/src/G__cpp_SVP.cxx:5726:131: **error: ‘std::__cxx11::list<unsigned char*>::iterator’ has no member named ‘operator!=’; did you mean ‘operator=’?**
[build]  5726 |       G__letint(result7, 103, (long) ((list<unsigned char*,allocator<unsigned char*> >::iterator*) G__getstructoffset())->operator!=(*(list<unsigned char*,allocator<unsigned char*> >::iterator*) libp->para[0].ref));

But, the same .cxx file generated from CINT gets compiled successfully on gcc-4.8.5

Can someone please give inputs to resolve this for gcc-13.2?

Hi, I’m not sure CINT supports gcc 13… Maybe @pcanal knows better

@bellenot , thanks for the response.

@pcanal , can you please suggest if you know a fix/workaround for this

Hi,

We have stopped supporting CINT a long time ago. The best solution is to move to v6.32.02 which uses the much improved interpreter named Cling. If for some reasons this is not an option you could try v5.34/38 which is the last update we made using CINT. If for some reasons this also does not work, you would need to tweak the file cint/cint/lib/prec_stl/list to remove the offending declaration.

Cheers,
Philippe.

PS. Note that that the version v5.18.00 that is mentioned in the original post is 16 years old!

BTW. Try to configure a “minimal” ROOT 5 “in-place” … using, e.g.:
./configure --minimal --disable-builtin-lz4 --enable-soversion

1 Like

Hi @pcanal ,

Thank you for your response.

I tried tweaking the file cint/cint/lib/prec_stl/list by commenting the below lines of the file:
//friend bool operator==(const list& x, const list& y);
//friend bool operator!=(const list& x, const list& y);

I then built cint after the above changes and I still see the same error while compiling the .cxx file
Looks like the tweaking I have done is not at the right place.
Can you suggest here for the same?

Hi @pcanal/@bellenot ,

I tried commenting the below 2 lines of prec_stl/list as well:
//bool operator==(const iterator& x) ;
//bool operator!=(const iterator& x) ;

But, I see the same 2 errors while compiling the .cxx file.

Can you please suggest where exactly to change in the prec_stl/list file to resolve these errors?

No idea

Did you try with the head of the v5-34-00-patches branch? See Trying to build my project which uses CINT with gcc-13.2 on Ubuntu - #5 by Wile_E_Coyote

Hi @Wile_E_Coyote ,

I tried building cint from the GitHub - root-project/root at v5-34-00-patches branch using the below sequence of commands:

  1. git clone -b v5-34-00-patches GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
  2. cd root
  3. ./configure --minimal --disable-builtin-lz4 --enable-soversion
  4. sudo make clean
  5. sudo make CC=/usr/local/gcc_UBUNTU/bin/gcc CXX=/usr/local/gcc_UBUNTU/bin/g++ LD=/usr/local/gcc_UBUNTU/bin/g++ G__CFG_CC=/usr/local/gcc_UBUNTU/bin/gcc G__CFG_CXX=/usr/local/gcc_UBUNTU/bin/g++ G__CFG_LD=/usr/local/gcc_UBUNTU/bin/g++

Note: I am using gcc-4.8.5 version of Ubuntu to build the above

Getting below errors while building:
In file included from common/common.c:13:0:
common/common.h:92:27: error: expected ‘;’, ‘,’ or ‘)’ before ‘in’
const uint8_t *restrict in, size_t *restrict in_pos,
^
common/common.h:135:2: error: unknown type name ‘lzma_code_function’
lzma_code_function code;

Can you tell me the exact steps to build cint from the head of the v5-34-00-patches on Ubuntu?

Try:

rm -rf v5-34-00-patches
git clone --depth 1 --branch v5-34-00-patches https://github.com/root-project/root.git v5-34-00-patches
cd v5-34-00-patches
unset ROOTSYS
./configure --minimal --disable-builtin-lz4 --enable-soversion |& tee -a configure.out.txt
make |& tee -a make.out.txt

If anything goes wrong, attach here the two newly created “*.out.txt” files for inspection.

Hi @Wile_E_Coyote ,

Thank you for the inputs.
I was able to build as per the given instructions and the build was successful.

I can see that the CINT library libCint.so.5.34 has got built and is available under v5-34-00-patches/lib/ directory.
But, I dont see the CINT exeuctable being available in v5-34-00-patches directory post successful build.

Will the CINT executable be built in this process? Because, in my previous process of building CINT_5.18.00, post build both CINT executable and CINT library would be available.

A separate standalone CINT executable is not built with ROOT.
You can try (“bin/root.exe” embeds CINT):

source bin/thisroot.sh
root.exe -h
rootcint -h

@Wile_E_Coyote @pcanal @Axel Is there a way to build standalone CINT executable with this patch?

Because my .cxx file is generated using the below command:
cint -w0 -n…/…/LibCint/cint/src/G__cpp_SVP.cxx -D__MAKECINT__ -DG__MAKECINT -c-1 -A -I…/…/…/Base_Lib/msvp_com …

With ROOT, you will need to use the “rootcint” to generate the dictionary (I think you do not need to use the “ClassDef” and “ClassImp” macros as you do not plan to use ROOT I/O; @pcanal may confirm it).
See the old “ROOT 5 User’s Guide”.

Wile is correct. I am guessing you could hack the makefile to revive the cint build in the Makefile (I think it was removed by commit f96798a4a7).

@pcanal , @Axel ,

can you please give more details of the changes to be done in Makefile to build cint binary for 5.34 patch?

See Fix (dist)clean of cintdlls - it was not finding the files. · root-project/root@f96798a · GitHub.

However, you might find it easier to try using rootcint instead or you might find it easier (and more powerful) to upgrade to using Cling instead of CINT.

Hi @pcanal / @Wile_E_Coyote ,

Below is my CINT command used to generate the .cxx file:
cint -w0 -n…/…/LibCint/cint/src/G__cpp_SVP.cxx -D__MAKECINT__ -DG__MAKECINT -c-1 -A -I…/…/…/Base_Lib/msvp_com -I…/…/…/Common_Lib/ParameterHandler/Inc -I…/…/…/Base_Lib/Inc -I…/…/…/Common_Lib/MSVP_Namespace -I…/LibCint/cint/lib -I…/…/…/Base_Lib/CommonAPI -I…/LibCint -I…/…/…/Common_Lib/LibCint -I…/…/…/SCSI_Lib/Inc -I…/…/…/SCSI_Lib/scwl -I…/…/…/SCSI_Lib/scdbl -I…/…/…/SCSI_Lib/sdil -I…/…/…/Base_Lib/CoreLogger -I…/…/…/Base_Lib/MSVPConfiguration -I…/…/…/Base_Lib/CommonAPI -I…/…/…/OSAL -I…/…/…/Base_Lib/msvp_com -I…/…/…/Infusion_LIB -DG__REDIRECTIO -DG__SHAREDLIB -D_SCSI -DCINT_EXPORT -D__LINUX__ -DG__OSFDLL -DG__ANSI -DG__ERRORCALLBACK -DG__SIGNEDCHAR -DG__NEWSTDHEADER -D_CRT_SECURE_NO_DEPRECATE=1 -DG__CINT_VER6 -DG__NATIVELONGLONG -DG__P2FCAST -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO CintUtility.h SCSI_Cmd.h ParameterDictionary.h CommonAPI.h

If I have to use rootcint to generate the same G__cpp_SVP.cxx file, can you please tell me what should the rootcint command be for my case?

Try

rootcint -f …/…/LibCint/cint/src/G__cpp_SVP.cxx -c -I…/…/…/Base_Lib/msvp_com -I…/…/…/Common_Lib/ParameterHandler/Inc -I…/…/…/Base_Lib/Inc -I…/…/…/Common_Lib/MSVP_Namespace -I…/LibCint/cint/lib -I…/…/…/Base_Lib/CommonAPI -I…/LibCint -I…/…/…/Common_Lib/LibCint -I…/…/…/SCSI_Lib/Inc -I…/…/…/SCSI_Lib/scwl -I…/…/…/SCSI_Lib/scdbl -I…/…/…/SCSI_Lib/sdil -I…/…/…/Base_Lib/CoreLogger -I…/…/…/Base_Lib/MSVPConfiguration -I…/…/…/Base_Lib/CommonAPI -I…/…/…/OSAL -I…/…/…/Base_Lib/msvp_com -I…/…/…/Infusion_LIB -DG__REDIRECTIO -DG__SHAREDLIB -D_SCSI -DCINT_EXPORT -D__LINUX__ -DG__OSFDLL -DG__ANSI -DG__ERRORCALLBACK -DG__SIGNEDCHAR -DG__NEWSTDHEADER -D_CRT_SECURE_NO_DEPRECATE=1 -DG__CINT_VER6 -DG__NATIVELONGLONG -DG__P2FCAST -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO CintUtility.h SCSI_Cmd.h ParameterDictionary.h CommonAPI.h