EMAN2 cmake error, OPENGL missing

34 views
Skip to first unread message

rainf...@gmail.com

unread,
Aug 23, 2024, 12:35:46 AM8/23/24
to EMAN2

Dear EMAN2 developers,

I am trying to build EMAN2 from source.

I got an OPENGL error using either cmake or cmake3:

CMake Error at /soft/miniconda3/envs/eman2/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find OpenGL (missing: OPENGL_INCLUDE_DIR)

Is there any packing missing in my system? I am not sure which opengl library I should install.

On the website (https://blake.bcm.edu/emanwiki/EMAN2/Install/SourceInstall), there is a suggestion of quitting ccmake.

I tried "ccmake quit" and got another error " CMake Error: 

The source directory "/soft/eman2/eman2_build/quit" does not exist."

How should I proceed?

Thanks,

Lei

Ludtke, Steven J.

unread,
Aug 23, 2024, 9:40:28 AM8/23/24
to em...@googlegroups.com
What OS and version are you installing on. On Linux machines with GPUs you would normally have the necessary libraries installed. You may need to install mesa or mesa-dev depending on the OS to get the OpenGL headers if they are missing.

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/a6197ec6-1f48-4b16-8150-cd287d664442n%40googlegroups.com.

rainfieldcn

unread,
Aug 24, 2024, 4:45:59 AM8/24/24
to em...@googlegroups.com

We are using CentOS Linux release 7.9.2009 (Core).

We have nvidia GPU with NVIDIA-SMI 520.61.05    Driver Version: 520.61.05    CUDA Version: 11.8

In this case, which package should I install?

Thanks,

Lei                          

You received this message because you are subscribed to a topic in the Google Groups "EMAN2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eman2/2fSa0wrH-U0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/5955F8FD-90C9-4056-917E-09225BBAFFEB%40bcm.edu.

Steve Ludtke

unread,
Aug 24, 2024, 9:08:25 AM8/24/24
to em...@googlegroups.com
As the previous message suggested, the Mesa developers package should have the missing opengl headers

Sent from my iPhone

On Aug 24, 2024, at 3:45 AM, rainfieldcn <rainf...@gmail.com> wrote:



rainfieldcn

unread,
Aug 24, 2024, 10:13:09 AM8/24/24
to em...@googlegroups.com

I've installed all mesa related package. Now cmake works well.

But I got errors during make:

/soft/miniconda3/envs/eman2/lib/libLerc.so.4: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned long, char)@GLIBCXX_3.4.21'
/soft/miniconda3/envs/eman2/lib/libLerc.so.4: undefined reference to `operator delete(void*, unsigned long)@CXXABI_1.3.9'
collect2: error: ld returned 1 exit status
make[2]: *** [rt/imageio/CMakeFiles/test_eer.dir/build.make:109: rt/imageio/test_eer] Error 1
make[1]: *** [CMakeFiles/Makefile2:1233: rt/imageio/CMakeFiles/test_eer.dir/all] Error 2

/usr/lib/libGLX.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [libpyEM/CMakeFiles/pyGLUtils2.dir/build.make:164: libpyEM/libpyGLUtils2.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1155: libpyEM/CMakeFiles/pyGLUtils2.dir/all] Error 2

Steve Ludtke

unread,
Aug 24, 2024, 12:49:57 PM8/24/24
to em...@googlegroups.com
What version of gcc are you using?  Not positive that this is your problem, but centos default compilers are ancient and will not be able to compile eman2 (or a lot of other things). There can also be issues with out of date system libraries, but most of these are handled by anaconda

Sent from my iPhone

On Aug 24, 2024, at 9:13 AM, rainfieldcn <rainf...@gmail.com> wrote:



rainfieldcn

unread,
Sep 4, 2024, 5:05:48 AM9/4/24
to em...@googlegroups.com

I am using GCC 7 through devtools  "scl enable devtoolset-7 bash"

My Glibc version is 2.17.

Which GCC version is suggested for EMAN2?

Thanks,

Lei


ldd (GNU libc) 2.17

Ludtke, Steven J.

unread,
Sep 4, 2024, 8:14:55 AM9/4/24
to em...@googlegroups.com
The most recent version you have access to. From the EMAN2 installation page:

Standard compilers on CentOS 6 and 7, do not support gcc's dual ABI feature which is needed to compile EMAN2's modern C++ code. On our build machine, devtools-7 and devtools-11 have been tested and confirmed to fail to compile EMAN2 code. 

That is, you need a modern version of the GCC compiler chain. While you don't need to go that far, we do require support for at least C++11 and dual-ABI, C++17 is recommended, but I don't think it's absolutely required yet (not positive, I do remember telling people it was ok to use C++17 features if they needed to). 

Dual-ABI was introduced in GCC 5 to comply with the C++11 specifications, but for some reason RHEL/CentOS decided not to use it, despite this being over a decade old at this point. As far as I know they are unique in that bizarre decision.

Anyway, most CentOS installations targeted at science/engineering will also have a complier chain set up to compile modern C++ code (>=C++11), but every sysadmin handles this issue in their own way...

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

Ludtke, Steven J.

unread,
Sep 4, 2024, 10:51:14 AM9/4/24
to em...@googlegroups.com
I think our most recent CentOS 7 advice was actually to install one of the binaries, because compiling from source would require dealing with a bunch of system libraries compiled without dual ABI?  Sorry, I haven't run on a CentOS 7 machine in quite a while. CentOS 7 is now officially past end-of-life (https://www.redhat.com/en/topics/linux/centos-linux-eol#:~:text=Hat%20Enterprise%20Linux%3F-,Overview,)%20on%20June%2030%2C%202024.).

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

Reply all
Reply to author
Forward
0 new messages