Previous Thread
Next Thread
Print Thread
#38627 02/21/23 06:54 PM
Joined: Feb 2013
Posts: 6
classen Offline OP
Forum Member
OP Offline
Forum Member
Joined: Feb 2013
Posts: 6
Hello,
I'm trying to build a docker container with CHARMM (c47b1) installed.

The docker container is based on Alpine Linux 3.17.2 with the following packages added:
cmake 3.24.3
gcc 12.2.1
gfortran 12.2.1

For the most part it looks like things are working

./configure completes, but I get these errors at the end of compilation:

Code
#0 67.85 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/mc.F90.o
#0 68.28 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/smbp.F90.o
#0 68.28 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/epert.F90.o
#0 68.28 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/sccdftbini.F90.o
#0 68.37 /usr/local/src/charmm/build/cmake/smbp.F90:758:27:
#0 68.37 
#0 68.37   524 |       CALL DCOPY(N,RVEC,1,PVEC,1)
#0 68.37       |                   2        
#0 68.37 ......
#0 68.37   758 |         CALL DCOPY(NATSURF,IGMSEL,1,SAVEIG,1)
#0 68.37       |                           1
#0 68.37 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
#0 68.37 /usr/local/src/charmm/build/cmake/smbp.F90:817:36:
#0 68.37 
#0 68.37   524 |       CALL DCOPY(N,RVEC,1,PVEC,1)
#0 68.37       |                          2          
#0 68.37 ......
#0 68.37   817 |         CALL DCOPY(NATSURF,SAVEIG,1,IGMSEL,1)
#0 68.37       |                                    1
#0 68.37 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)).
#0 72.28 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/energy.F90.o
#0 72.37 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/miscom.F90.o
#0 74.54 [100%] Linking Fortran static library libcharmm_fortran.a
#0 74.77 make[2]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 74.78 [100%] Built target charmm_fortran
#0 74.78 make[1]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 74.78 make: *** [Makefile:136: all] Error 2
#0 74.78 make: Leaving directory '/usr/local/src/charmm/build/cmake'
------
failed to solve: executor failed running [/bin/sh -c make -j8 -C build/cmake install]: exit code: 2

Any advice on what (if anything) might be going wrong?

Thanks

Joined: Apr 2013
Posts: 37
B
Forum Member
Offline
Forum Member
B
Joined: Apr 2013
Posts: 37
The actual error will be further up in the make output. You can save the output to a text file and then search for 'error'.

Joined: Feb 2013
Posts: 6
classen Offline OP
Forum Member
OP Offline
Forum Member
Joined: Feb 2013
Posts: 6
Hmmm. Well I probably should have thought of that.... thanks.

Investigation revealed the following error:

Code
fatal error: execinfo.h: No such file or directory

which was fixed by installing these two additional packages:
libexecinfo
libexecinfo-dev


I now have the following errors which my Google-fu skills have not yet determined a solution to.:

Code
#0 87.83 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/energy.F90.o
#0 90.28 [100%] Building Fortran object CMakeFiles/charmm_fortran.dir/miscom.F90.o
#0 91.17 [100%] Linking Fortran static library libcharmm_fortran.a
#0 91.39 make[2]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 91.41 [100%] Built target charmm_fortran
#0 91.41 make[2]: Entering directory '/usr/local/src/charmm/build/cmake'
#0 91.41 [100%] Generating charmm_main.F90
#0 91.42 Scanning dependencies of target charmm
#0 91.42 make[2]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 91.42 make[2]: Entering directory '/usr/local/src/charmm/build/cmake'
#0 91.42 [100%] Building Fortran object CMakeFiles/charmm.dir/charmm_main.F90.o
#0 91.59 [100%] Linking Fortran executable charmm
#0 91.79 /usr/lib/gcc/x86_64-alpine-linux-musl/11.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: libcharmm_c.a(cstuff.c.o): in function `stack_trace':
#0 91.79 cstuff.c:(.text+0x72a): undefined reference to `backtrace'
#0 91.79 /usr/lib/gcc/x86_64-alpine-linux-musl/11.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cstuff.c:(.text+0x736): undefined reference to `backtrace_symbols'
#0 91.81 collect2: error: ld returned 1 exit status
#0 91.81 make[2]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 91.81 make[2]: *** [CMakeFiles/charmm.dir/build.make:103: charmm] Error 1
#0 91.81 make[1]: *** [CMakeFiles/Makefile2:197: CMakeFiles/charmm.dir/all] Error 2
#0 91.81 make[1]: Leaving directory '/usr/local/src/charmm/build/cmake'
#0 91.81 make: *** [Makefile:136: all] Error 2
#0 91.81 make: Leaving directory '/usr/local/src/charmm/build/cmake'

Joined: Feb 2013
Posts: 6
classen Offline OP
Forum Member
OP Offline
Forum Member
Joined: Feb 2013
Posts: 6
Well maybe there is some incompatibility with Alpine Linux because of the use of musl libc instead of glibc
as pointed out in the docker nodejs repo notes:

Quote
This variant [Alpine Linux] is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use musl libc instead of glibc and friends, so software will often run into issues depending on the depth of their libc requirements/assumptions.

Maybe I'll try doing this in a debian based image.

Joined: Apr 2013
Posts: 37
B
Forum Member
Offline
Forum Member
B
Joined: Apr 2013
Posts: 37
Is it possible for you to post steps to do this from scratch? I would be interested in making charmm compatible with musl and Alpine linux.

The backtrace stuff isn't particularly important. You could pop open source/machdep/cstuff.c and comment out the #include and the contents of the stacktrace function without harming the simulation stuff.

On certain platforms, in certain error/fail situations, stacktrace is supposed to provide something that looks like a backtrace. Sort of like when you compile with '-g' and have a segfault.


Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.3.31-1~deb10u5 Page Time: 0.012s Queries: 24 (0.008s) Memory: 0.7492 MB (Peak: 0.8062 MB) Data Comp: Off Server Time: 2023-10-03 17:32:07 UTC
Valid HTML 5 and Valid CSS