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

libcifpp compilation failed #798

Closed
rsanchezgarc opened this issue Jul 28, 2023 · 6 comments
Closed

libcifpp compilation failed #798

rsanchezgarc opened this issue Jul 28, 2023 · 6 comments
Assignees
Labels
In progress We're currently working on this needs confirmation Review to label and confirm

Comments

@rsanchezgarc
Copy link
Collaborator

Hi,

I am trying to install xmipp in a new machine and I am getting the following error. I assume is a version issue. Any help here?
My compiler is gcc/++ 11.2

Compiling libcifpp--------
Not trying to recreate symop_table_data.hpp since CCP4 is not defined
-- Testing for known regex bug, since you're using GNU libstdc++
-- You are probably trying to compile using the g++ standard library which contains a crashing std::regex implementation. Will use boost::regex instead
-- Found the following ICU libraries:
-- data (required): /usr/lib64/libicudata.so
-- i18n (required): /usr/lib64/libicui18n.so
-- uc (required): /usr/lib64/libicuuc.so
-- Configuring done (0.3s)

-- Generating done (0.0s)
-- Build files have been written to: /data/nagagpu05/not-backed-up/special-project/app/scipion3/software/em/xmipp/src/libcifpp/build
[ 4%] Building CXX object CMakeFiles/cifpp.dir/src/utilities.cpp.o
[ 9%] Building CXX object CMakeFiles/cifpp.dir/src/point.cpp.o
In file included from /data/nagagpu05/not-backed-up/special-project/app/scipion3/software/em/xmipp/src/libcifpp/src/point.cpp:27:
/data/nagagpu05/not-backed-up/special-project/app/scipion3/software/em/xmipp/src/libcifpp/include/cif++/point.hpp:734:32: error: ‘uint32_t’ has not been declared
734 | const point operator[](uint32_t inIx) const { return m_points[inIx]; }
| ^~~~~~~~
gmake[2]: *** [CMakeFiles/cifpp.dir/build.make:258: CMakeFiles/cifpp.dir/src/point.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:101: CMakeFiles/cifpp.dir/all] Error 2

@albertmena albertmena added the needs confirmation Review to label and confirm label Jul 31, 2023
@MartinSalinas98
Copy link
Collaborator

Hey @rsanchezgarc , it might be a std library issue. For me, when I open file xmipp/src/libcifpp/include/cif++/point.hpp in a text editor like VSCode and Ctrl+click on uint32_t in line 734, it takes me to the declaration inside the std library of c++. You might have an older version of that library since your compiler says that there is no declaration of that data type.

If you are on a Debian based distro (like Ubuntu), maybe doing sudo apt install libstdc++-11 could fix your issue.

@oxforddwm
Copy link

This appears to be caused by point.hpp and its include set not including the directive:

#include <cstdint>

I found that adding this file to the other includes in point.hpp resolved this problem. This may not be the ideal fix, but works for me.

@MartinSalinas98
Copy link
Collaborator

MartinSalinas98 commented Aug 2, 2023

@oxforddwm you are probably right. That seems to be a fix for it, since the original developer of the library causing this issue, libcifpp, already implemented this fix in his repo. I'm going to (very carefully) update the fork xmipp uses with the latest changes to make sure they don't break any other thing (like gcc 8 and 9 version compatibility, because the original repo uses very new c++ features that only worked with gcc/g++ in version 10+). As soon as that is done, you can try to reinstall xmipp running:

scipion3 run ./xmipp cleanAll
(type "YeS" when prompted)
scipion3 run ./xmipp

@MartinSalinas98
Copy link
Collaborator

It looks like it also adds new dependencies, which is pretty difficult to justify for xmipp, since we try to avoid new depencies if at all costs. So, I'll just copy that change for now.

@rsanchezgarc Try again with the commands I provided in the previous message, it should work now (hopefully).

@MartinSalinas98 MartinSalinas98 added the In progress We're currently working on this label Aug 2, 2023
@rsanchezgarc
Copy link
Collaborator Author

Hi Martin,

Changing the header file was enough to compile it. Though I was not able to cully compile xmipp, but I will open another issue.

@MartinSalinas98
Copy link
Collaborator

Okay, so I'm closing this one now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In progress We're currently working on this needs confirmation Review to label and confirm
Projects
None yet
Development

No branches or pull requests

4 participants