Skip to content
New issue

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

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

Already on GitHub? # to your account

Building coot on Ubuntu 22.04.4 LTS failed #126

Open
mstabrin opened this issue Mar 21, 2024 · 5 comments
Open

Building coot on Ubuntu 22.04.4 LTS failed #126

mstabrin opened this issue Mar 21, 2024 · 5 comments

Comments

@mstabrin
Copy link

Hello!

I am trying to install coot on a fresh Ubuntu 22.04.4 LTS system.

I am running the build-it-3-3 script from yesterdays main branch.

After resolving the os package dependencies, I finally get to the coot build step, but it fails with:

Making all in ui
make[1]: Entering directory '/opt/user_software/coot/src/build-coot/ui'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/opt/user_software/coot/src/build-coot/ui'
make[1]: Entering directory '/opt/user_software/coot/src/build-coot'
make[1]: *** No rule to make target 'colours.def', needed by 'all-am'.  Stop.
make[1]: Leaving directory '/opt/user_software/coot/src/build-coot'
make: *** [Makefile:714: all-recursive] Error 1

I seems that colours.def is missing here.
What could have gone wrong and where can I search for more information about the issue?

build-gtk4.log
30-coot.txt
coot-install_log.tar.gz

Thank you for your help!

Best,
Markus

@mstabrin
Copy link
Author

Ok, I just saw your commit from 7 hours ago.
I will test it ^^

@jianghaizhu
Copy link

@pemsley I downloaded coot-Release-1.1.09-build-fixup.tar.gz and unarchived it.Then I ran bash build-it-3-3 inside the directory. The compilation failed in Coot with the following errors.

libtool: compile:  g++ -DPACKAGE_NAME=\"coot\" -DPACKAGE_TARNAME=\"coot\" -DPACKAGE_VERSION=\"1.1.09\" "-DPACKAGE_STRING=\"coot 1.1.09\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"coot\" -DVERSION=\"1.1.09\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_OPENMP=1 -DHAVE_CXX11=1 -DHAVE_CXX_THREAD=1 -DHAVE_LIBM=1 -DHAVE_LIBGSLCBLAS=1 -DHAVE_LIBGSL=1 -DHAVE_PYTHON=\"3.11\" "-DHAVE_BOOST=/**/" "-DHAVE_BOOST_THREAD=/**/" "-DHAVE_BOOST_PYTHON=/**/" -I. -I../../coot/lidia-core -I../../coot -DMAKE_ENHANCED_LIGAND_TOOLS -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include/rdkit -DRDKIT_HAS_CAIRO_SUPPORT -pthread -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DUSE_SQLITE3 -I/home/linuxbrew/.linuxbrew/opt/sqlite/include -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DCLIPPER_HAS_TOP8000 -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DMMDB_HAS_LINK_DISTANCE -pthread -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -g -O -Wall -Wno-unused -std=c++17 -MT rdkit-interface.lo -MD -MP -MF .deps/rdkit-interface.Tpo -c ../../coot/lidia-core/rdkit-interface.cc  -fPIC -DPIC -o .libs/rdkit-interface.o
In file included from ../../coot/lidia-core/rdkit-interface.hh:25,
                 from ../../coot/lidia-core/rdkit-interface.cc:27:
../../coot/lidia-core/use-rdkit.hh:40:10: fatal error: RDGeneral/Invariant.h: No such file or directory
   40 | #include <RDGeneral/Invariant.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:669: rdkit-interface.lo] Error 1
make[1]: Leaving directory '/home/zhuj6/coot-Release-1.1.09-build-fixup/build-coot/lidia-core'
make: *** [Makefile:707: all-recursive] Error 1
make failed.

The rdkit was not compiled according to the log file.

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - broken
CMake Error at /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    
    Run Build Command(s): /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_065fd/fast
    /usr/bin/gmake  -f CMakeFiles/cmTC_065fd.dir/build.make CMakeFiles/cmTC_065fd.dir/build
    gmake[1]: Entering directory '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    Building C object CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o
    /usr/bin/gcc    -o CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o -c /home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz/testCCompiler.c
    Linking C executable cmTC_065fd
    /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_065fd.dir/link.txt --verbose=1
    /usr/bin/gcc -L/home/zhuj6/autobuild/Linux-Baltimore-gtk4/lib -lintl  CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o -o cmTC_065fd
    /usr/bin/ld: cannot find -lintl: No such file or directory
    collect2: error: ld returned 1 exit status
    gmake[1]: *** [CMakeFiles/cmTC_065fd.dir/build.make:99: cmTC_065fd] Error 1
    gmake[1]: Leaving directory '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    gmake: *** [Makefile:127: cmTC_065fd/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
problem configuring the RDKit.

How do I get RDKit to be compiled correctly?

@Lai-Yz
Copy link

Lai-Yz commented Aug 29, 2024

@pemsley I downloaded coot-Release-1.1.09-build-fixup.tar.gz and unarchived it.Then I ran bash build-it-3-3 inside the directory. The compilation failed in Coot with the following errors.

libtool: compile:  g++ -DPACKAGE_NAME=\"coot\" -DPACKAGE_TARNAME=\"coot\" -DPACKAGE_VERSION=\"1.1.09\" "-DPACKAGE_STRING=\"coot 1.1.09\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"coot\" -DVERSION=\"1.1.09\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_OPENMP=1 -DHAVE_CXX11=1 -DHAVE_CXX_THREAD=1 -DHAVE_LIBM=1 -DHAVE_LIBGSLCBLAS=1 -DHAVE_LIBGSL=1 -DHAVE_PYTHON=\"3.11\" "-DHAVE_BOOST=/**/" "-DHAVE_BOOST_THREAD=/**/" "-DHAVE_BOOST_PYTHON=/**/" -I. -I../../coot/lidia-core -I../../coot -DMAKE_ENHANCED_LIGAND_TOOLS -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include/rdkit -DRDKIT_HAS_CAIRO_SUPPORT -pthread -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DUSE_SQLITE3 -I/home/linuxbrew/.linuxbrew/opt/sqlite/include -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DCLIPPER_HAS_TOP8000 -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -DMMDB_HAS_LINK_DISTANCE -pthread -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -I/home/zhuj6/autobuild/Linux-Baltimore-gtk4/include -g -O -Wall -Wno-unused -std=c++17 -MT rdkit-interface.lo -MD -MP -MF .deps/rdkit-interface.Tpo -c ../../coot/lidia-core/rdkit-interface.cc  -fPIC -DPIC -o .libs/rdkit-interface.o
In file included from ../../coot/lidia-core/rdkit-interface.hh:25,
                 from ../../coot/lidia-core/rdkit-interface.cc:27:
../../coot/lidia-core/use-rdkit.hh:40:10: fatal error: RDGeneral/Invariant.h: No such file or directory
   40 | #include <RDGeneral/Invariant.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:669: rdkit-interface.lo] Error 1
make[1]: Leaving directory '/home/zhuj6/coot-Release-1.1.09-build-fixup/build-coot/lidia-core'
make: *** [Makefile:707: all-recursive] Error 1
make failed.

The rdkit was not compiled according to the log file.

-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - broken
CMake Error at /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    
    Run Build Command(s): /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_065fd/fast
    /usr/bin/gmake  -f CMakeFiles/cmTC_065fd.dir/build.make CMakeFiles/cmTC_065fd.dir/build
    gmake[1]: Entering directory '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    Building C object CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o
    /usr/bin/gcc    -o CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o -c /home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz/testCCompiler.c
    Linking C executable cmTC_065fd
    /home/linuxbrew/.linuxbrew/Cellar/cmake/3.30.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_065fd.dir/link.txt --verbose=1
    /usr/bin/gcc -L/home/zhuj6/autobuild/Linux-Baltimore-gtk4/lib -lintl  CMakeFiles/cmTC_065fd.dir/testCCompiler.c.o -o cmTC_065fd
    /usr/bin/ld: cannot find -lintl: No such file or directory
    collect2: error: ld returned 1 exit status
    gmake[1]: *** [CMakeFiles/cmTC_065fd.dir/build.make:99: cmTC_065fd] Error 1
    gmake[1]: Leaving directory '/home/zhuj6/autobuild/building/Baltimore_2024-07-05__T18_44_56/rdkit-Release_2023_09_4/build/CMakeFiles/CMakeScratch/TryCompile-3RQagz'
    gmake: *** [Makefile:127: cmTC_065fd/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
problem configuring the RDKit.

How do I get RDKit to be compiled correctly?

Hello. Same problem for me. Have you solved it?

@pemsley
Copy link
Owner

pemsley commented Sep 3, 2024

I have made a tweak to the build-it-3-3 so that it builds on Debian (it also had the -linitl problem).

See line 3829, it tests for debian, you want that test to be true for you.

@jianghaizhu
Copy link

@pemsley I finally compiled Coot 1.1 on Ubuntu 24.04. Unlike Coot installed by Homebrew, the manually compiled version utilizes my NVIDIA card for rendering and is finally usable.

I needed to modify the build-it-3-3 script a little. Probably not all of them are necessary.

diff --git a/build-it-3-3 b/build-it-3-3
index 3b0cc2d69..4f841d90a 100644
--- a/build-it-3-3
+++ b/build-it-3-3
@@ -1167,7 +1167,7 @@ case $dist_name in
        libblas-dev
        liblapack-dev
        libc6-dev
-       libncurses5-dev
+       libncurses-dev
        libjpeg-dev
        libgtk-4-dev'
        # gfortran is for numpy
@@ -2982,7 +2982,7 @@ if command -v meson --version ; then
 fi

 if $build_meson = true ; then
-   meson_version=1.2.3
+   meson_version=1.3.2
    echo BUILDING meson $meson_version:
    echo BUILDING meson $meson_version: >&2
    (
@@ -3072,7 +3072,7 @@ if [ -e $install_top_dir/include/cairo/cairo.h ] ; then
 else
     # we need modern cairo - because that is what is used by GTK4.
     # in fact, perhaps we should build cairo at all on arch...
-    if test "$dist_name" = arch ; then
+    if test "$dist_name" = ubuntu ; then
         (
         cairo_version=1.18.2
         echo BUILDING: cairo $cairo_version
@@ -3089,7 +3089,7 @@ else
         cd ..
         ) > $HOSTLOGDIR/16-b-cairo-by-ninja.txt 2>&1
     else
-       cairo_version=1.16.0 # not meson/ninja
+       cairo_version=1.18.0 # not meson/ninja
         echo BUILDING: cairo $cairo_version
         echo BUILDING: cairo $cairo_version >&2
         (
@@ -4116,24 +4116,24 @@ fi

 # https://pypi.org/project/PyGObject/#files
 # https://download.gnome.org/sources/pygobject
-pygobject_major_minor_version=3.29
-pygobject_major_minor_version=3.30
-pygobject_major_minor_version=3.36
-pygobject_major_minor_version=3.42
-pygobject_version=3.29.1
-pygobject_version=3.30.5
-pygobject_version=3.42.1
-# pygobject_version=3.42.2 add me to the extras place!
+# pygobject_major_minor_version=3.29
+# pygobject_major_minor_version=3.30
+# pygobject_major_minor_version=3.36
+# pygobject_major_minor_version=3.42
+# pygobject_version=3.29.1
+# pygobject_version=3.30.5
+# pygobject_version=3.42.1
+# pygobject_version=3.42.2 # add me to the extras place!
 # https://download.gnome.org/sources/pygobject/3.42/pygobject-3.42.2.tar.xz

 date
 pwd
-skip_build=false
-if [ $test_for_already_installed_dependencies = true ] ; then
-   if [ -e $install_top_dir/include/pygobject-3.0/pygobject.h ] ; then
-      skip_build=true
-   fi
-fi
+skip_build=true
+# if [ $test_for_already_installed_dependencies = true ] ; then
+#    if [ -e $install_top_dir/include/pygobject-3.0/pygobject.h ] ; then
+#       skip_build=true
+#    fi
+# fi

 if [ $skip_build = false ] ; then

To make it run, I also need to add export LD_LIBRARY_PATH=$prefix/lib in the coot file. But I got the following error and Coot started with a black screen.

WARNING:: new_startup_realize() gtk_gl_area_get_error() returned an error:
Unable to create a GL context

To fix that, I need to run GDK_DEBUG=gl-glx ./coot. Now I have a working Coot 1.1 that uses my NVIDIA card.

----------------------- print_opengl_info() ----------
INFO:: GL Version:                  4.6.0 NVIDIA 550.107.02
INFO:: GL Shading Language Version: 4.60 NVIDIA
INFO:: GL Renderer:                 NVIDIA GeForce RTX 3090/PCIe/SSE2
INFO:: GL Vendor:                   NVIDIA Corporation

Still got these errors:

GL ERROR:: Mesh::setup_buffers() --- start ---
ERROR:: failed to find preferences_bond_width_combobox
ERROR:: failed to find preferences_font_size_combobox

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

No branches or pull requests

4 participants