Closed vlocateli closed 3 months ago
The tests probably fail because they don't have test data. Please clone https://github.com/neutronimaging/TestData
Your issue with CXX could be related to your version of the gcc compiler. Can you check if your gcc compiler has the "new" ABI libstdc++11 available and on by default? In contrast to the old ABI: libstdc++. The conan profile you use from the repo assumes that the new ABI is on by default. You might have to change a flag to enable this.
My libstdc++ is libstdc++.so.6. I made a simple C++ program:
#include <iostream>
int main(){
std::cout << "hello" << std::endl;
return 0;
}
and used ldd i got:
linux-vdso.so.1
libstdc++.so.6
libc.so.6
libm.so.6
/lib64/ld-linux-x86-64.so.2
I need this flag?
-D_GLIBCXX_USE_CXX11_ABI=0
The tests probably fail because they don't have test data. Please clone https://github.com/neutronimaging/TestData
Ok, I will clone the new repo. I forgot to do it in the university machine. :/
and used ldd i got:
linux-vdso.so.1 libstdc++.so.6 libc.so.6 libm.so.6 /lib64/ld-linux-x86-64.so.2
This does not really tell me whether or not your compiler uses the new ABI or old ABI by default. Can you run the following command in a terminal and report the output?
gcc -v 2>&1 | sed -n 's/.*\(--with-default-libstdcxx-abi=new\).*/\1/p'
I need this flag?
-D_GLIBCXX_USE_CXX11_ABI=0
This flag forces the compiler to use the old ABI. If you set this flag, then you will also need to change the libcxx line in the conan profile to:
compiler.libcxx=libstdc++
The important point is that your own compiler uses the same ABI as the consumed conan packages, whether that is the new ABI (libstdc++11) or the old ABI (libstdc++). I guess it is worth a try to see if it compiles and runs with the old ABI. Please ensure that you delete the build folder and re-run the conan install command to fetch new conan packages if you change the ABI.
Also, please check your version of gcc by running:
gcc --version
If you're on kubuntu 22.04 the gcc compiler should be 11.4 by default, but if it is not then this also needs to be changed in the conan profile, as it is currently set to expect a gcc 11 compiler.
and used ldd i got:
linux-vdso.so.1 libstdc++.so.6 libc.so.6 libm.so.6 /lib64/ld-linux-x86-64.so.2
This does not really tell me whether or not your compiler uses the new ABI or old ABI by default. Can you run the following command in a terminal and report the output?
gcc -v 2>&1 | sed -n 's/.*\(--with-default-libstdcxx-abi=new\).*/\1/p'
I need this flag?
-D_GLIBCXX_USE_CXX11_ABI=0
This flag forces the compiler to use the old ABI. If you set this flag, then you will also need to change the libcxx line in the conan profile to:
compiler.libcxx=libstdc++
The important point is that your own compiler uses the same ABI as the consumed conan packages, whether that is the new ABI (libstdc++11) or the old ABI (libstdc++). I guess it is worth a try to see if it compiles and runs with the old ABI. Please ensure that you delete the build folder and re-run the conan install command to fetch new conan packages if you change the ABI.
I ran the first command and I got:
--with-default-libstdcxx-abi=new
My gcc version is 11.4 indeed.
Hmm, that appears to be correct. Do you have multiple versions of GCC on your system? Or did you upgrade from an old version? Sometimes the compiler grabs the wrong/an old version of the libstdc++ library. Otherwise we will have to dig deeper to figure this out.
Ok. I could build it fine now. I have another problem. I'll open another issue.
Hello, I'm having a problem when running MuhRec:
I linked like the README said with patchelf command:
From what I've seen this is probably a CXX file being compile by a C compiler which demangles to:
also, some tests are failing when running Ctest.
Thanks.