Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure #8

Open
adamaequo opened this issue Jun 3, 2021 · 7 comments
Open

Installation failure #8

adamaequo opened this issue Jun 3, 2021 · 7 comments

Comments

@adamaequo
Copy link

adamaequo commented Jun 3, 2021

Hey, I tried to install PyEtaler on a ubuntu20.04, and so far all 3 methods failed, because of the same error.
I successfully installed Etaler, and was able to run the examples, but no luck getting PyEtaler to work so far.

Here is the full log of executing the command: "python3 genbinding.py" https://pastebin.com/24K4H0mP

If I run the rootcling command on its own, I get:

$ rootcling -v3 -f etaler_rflx.cpp -cxxflags -std=c++1z -Wno-implicit-fallthrough -pipe  -fsigned-char -pthread Etaler/Etaler.hpp Etaler/3rdparty/backward-cpp/backward.hpp Etaler/3rdparty/backward-cpp/test/test.hpp Etaler/3rdparty/half_precision/half.hpp Etaler/3rdparty/pcg-cpp/include/pcg_extras.hpp Etaler/3rdparty/pcg-cpp/include/pcg_random.hpp Etaler/3rdparty/pcg-cpp/include/pcg_uint128.hpp Etaler/Algorithms/Anomaly.hpp Etaler/Algorithms/Boost.hpp Etaler/Algorithms/SDRClassifer.hpp Etaler/Algorithms/SpatialPooler.hpp Etaler/Algorithms/SpatialPoolerND.hpp Etaler/Algorithms/Synapse.hpp Etaler/Algorithms/TemporalMemory.hpp Etaler/Backends/CPUBackend.hpp Etaler/Core/Backend.hpp Etaler/Core/DType.hpp Etaler/Core/DefaultBackend.hpp Etaler/Core/Error.hpp Etaler/Core/Half.hpp Etaler/Core/Random.hpp Etaler/Core/Serialize.hpp Etaler/Core/Shape.hpp Etaler/Core/SmallVector.hpp Etaler/Core/String.hpp Etaler/Core/Tensor.hpp Etaler/Core/TensorImpl.hpp Etaler/Core/TypeHelpers.hpp Etaler/Core/TypeList.hpp Etaler/Core/Views.hpp Etaler/Encoders/Category.hpp Etaler/Encoders/GridCell1d.hpp Etaler/Encoders/GridCell2d.hpp Etaler/Encoders/Scalar.hpp selection.xml
rootcling: for the   -f option: may only occur zero or one times!
rootcling: for the   -s option: may not occur within a group!

To me it seems like this error occurs because "-std=c++1z" is a -s option and "-fsigned-char" a -f option...

@marty1885
Copy link
Member

@adamaequo Hi, thanks for reporting the issue. Hmm... do you happen to have ROOT installed on your computer? Their rootcling installation would clash and produce weird outputs.

@adamaequo
Copy link
Author

adamaequo commented Jun 4, 2021

As far as I am aware of, no. I tested it with:

$ root

Command 'root' not found, but can be installed with:

sudo snap install root-framework

@marty1885
Copy link
Member

Thanks, may you share the version of cppyy, gcc and python you are using?

@adamaequo
Copy link
Author

$ python3 --version
Python 3.8.5
$ pip list | grep cppyy
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
cppyy                        2.0.0               
cppyy-backend                1.14.5              
cppyy-cling                  6.25.0              
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

@wlav
Copy link

wlav commented Jun 5, 2021

cppyy 2.0.0 has Cling based on Clang9, the options parser of which has changed: options that are not recognized are no longer send into a "sink" option if part of the option is recognized. That is "-std=c++1z" is parsed as "-s td=c++1z" b/c the "-s" is a valid option. Similar for "-f". To pass extra CLI arguments to Cling, underlying rootcling, use the -cxxflags option, and collate all options with a set of quotes, so for example: -cxxflags='-std=c++1z -fsigned-char'. That will make Clang9 happy.

Note that that syntax is compatible with cppyy 1.x, as the -cxxflags option has been around since the beginning, just that the "sink" option was more convenient.

@marty1885
Copy link
Member

marty1885 commented Jun 6, 2021

@wlav Thanks for helping! There seems to be problem with the new cling. It seems to be stuck in an infinite recursion. I think I've seen this behavior before cppyy 2.0. But ignored it since I can fallback to a old cppyy.

 #22 0x00007f8851dc5ad6 CppyyLegacy::TMemberInspector::InspectMember(char const*, void const*, char const*, bool) (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so+0x100ad6)
 #23 0x00007f88525e5fb0 CppyyLegacy::TCling::InspectMembers(CppyyLegacy::TMemberInspector&, void const*, CppyyLegacy::TClass const*, bool) (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCling.so+0x646fb0)
 #24 0x00007f8851e211ca CppyyLegacy::TClass::CallShowMembers(void const*, CppyyLegacy::TMemberInspector&, bool) const (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so+0x15c1ca)
 #25 0x00007f8851dc5ad6 CppyyLegacy::TMemberInspector::InspectMember(char const*, void const*, char const*, bool) (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so+0x100ad6)
 #26 0x00007f88525e5fb0 CppyyLegacy::TCling::InspectMembers(CppyyLegacy::TMemberInspector&, void const*, CppyyLegacy::TClass const*, bool) (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCling.so+0x646fb0)
 #27 0x00007f8851e211ca CppyyLegacy::TClass::CallShowMembers(void const*, CppyyLegacy::TMemberInspector&, bool) const (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so+0x15c1ca)
 #28 0x00007f8851dc5ad6 CppyyLegacy::TMemberInspector::InspectMember(char const*, void const*, char const*, bool) (/home/marty/.local/lib/python3.9/site-packages/cppyy_backend/lib/libCoreLegacy.so+0x100ad6)
...

I tried to debug this myself. But it's way too out of my capabilities. ROOT 6.24 seem to be able to handle the library just fine. Should I open a bug in cppyy?

@wlav
Copy link

wlav commented Jun 6, 2021

Should I open a bug in cppyy?

If it's standalone reproducible, then sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants