Title: Issue with MESA Installation: Unable to Find crtend.o
Closed this issue · 3 comments
I am encountering an issue while trying to install MESA, the stellar evolution simulator, on Ubuntu. I have followed the necessary steps to set up the environment variables: export MESA_DIR=/home/karli/MESA/mesa-r23.05.1
and export MESASDK_ROOT=/home/karli/MESA/mesasdk
, and I have verified that both paths are correct.
However, when proceeding to the next step by navigating to the MESA directory with cd /home/karli/MESA/mesa-r23.05.1
and executing ./install
, I encounter the following error:
/home/karli/MESA/mesa-r23.05.1/constbuilding const package. LOADER ../tester/home/karii/MESA/mesasdk/bin/../../lib/gcc/x86_64-pc-linux-gnu/13.1.0/../../../x86_64-pc-linux-gnu/bin/ld: cannot find crtend.o: No such file or directory
collect2: error: ld returned 1 exit status
makefile_base:35: recipe for target '../tester' failed
make: *** [../tester] Error 1
/home/karli/MESA/mesa-r23.05.1/const/testFAILED
/home/karli/MESA/mesa-r23.05.1/const/build_and_test FAILED
It seems like there is an issue with finding the crtend.o
file during the compilation process.
Steps taken:
- Verified that the environment variables
MESA_DIR
andMESASDK_ROOT
are correctly set to the respective paths. - Checked for any missing dependencies, but everything appears to be in order.
- Tried cleaning and reinstalling MESA, but the issue persists.
Environment details:
- OS: Ubuntu (version)
- MESA version: mesa-r23.05.1
- MESASDK version: (if applicable)
- Compiler: (e.g., gcc version)
Please let me know if any additional information is needed to troubleshoot this problem. I would greatly appreciate any assistance in resolving this issue.
Did you also run source $MESASDK_ROOT/bin/mesasdk_init.sh
? crtend.o
is part of GCC and bundled in the MESA SDK.
Once you've set up the build (i.e. set MESA_DIR
, MESASDK_ROOT
and run source $MESASDK_ROOT/bin/mesasdk_init.sh
), please go to the MESA directory and let us know the output of ./help
. e.g. I would do something like
$ export MESA_DIR=~/mesa/r23.05.1
$ export MESASDK_ROOT=~/mesa/sdk/22.6.1
$ source $MESASDK_ROOT/bin/mesasdk_init.sh
$ cd $MESA_DIR
$ ./help
<copy this output>
Please rather copy the plain text output into your post, rather than attaching screenshots or photos of screens.
I hope you're doing well! First and foremost, I wanted to extend a heartfelt thank you for offering your help with my MESA installation issue:
export MESA_DIR=/home/karli/MESA/mesa-r23.05.1
~/MESA$ export MESASDK_ROOT=/home/karli/MESA/mesasdk
~/MESA$ cd $MESA_DIR
~/MESA/mesa-r23.05.1$ ./help
*** Copy and paste the following information into your email to mesa-users ***
MESA Version
r23.05.1
uname -a
Linux karli-virtual-machine 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
gfortran -v
Using built-in specs.
COLLECT_GCC=/home/karli/MESA/mesasdk/bin/gfortran.exec
COLLECT_LTO_WRAPPER=/home/karli/MESA/mesasdk/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/user/sdk2-tmp/build/gcc/configure CC= CXX= --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/home/user/sdk2-tmp/mesasdk --with-gmp=/home/user/sdk2-tmp/mesasdk --with-mpfr=/home/user/sdk2-tmp/mesasdk --with-mpc=/home/user/sdk2-tmp/mesasdk --enable-languages=c,c++,fortran --disable-multilib --disable-nls --disable-libsanitizer --enable-clocale=generic
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.1.0 (GCC)
$MESASDK_ROOT
/home/karli/MESA/mesasdk
MESASDK version
x86_64-linux-23.7.2
$PATH
/home/karli/MESA/mesasdk/bin:/home/karli/bin:/home/karli/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$MESA_DIR
/home/karli/MESA/mesa-r23.05.1
Thank you so much for taking the time to offer your help. If you need any more info from me or if there are more steps to follow, just holler. Your continued guidance would be super appreciated!
That all looks okay. Do you still get the error message when you run ./install
? (i.e., instead of ./help
)
If that still doesn't work, what's the output of
$ ls -l /home/karli/MESA/mesasdk/lib/gcc/x86_64-pc-linux-gnu/13.1.0
There should be a bunch of files including crtend.o
. I get
$ ls -l $MESASDK_ROOT/lib/gcc/x86_64-pc-linux-gnu/13.1.0/
total 6540
-rw-r--r--. 1 wball wball 2472 Jul 18 19:29 crtbegin.o
-rw-r--r--. 1 wball wball 2776 Jul 18 19:29 crtbeginS.o
-rw-r--r--. 1 wball wball 2992 Jul 18 19:29 crtbeginT.o
-rw-r--r--. 1 wball wball 1192 Jul 18 19:29 crtend.o
-rw-r--r--. 1 wball wball 1192 Jul 18 19:29 crtendS.o
-rw-r--r--. 1 wball wball 3856 Jul 18 19:29 crtfastmath.o
-rw-r--r--. 1 wball wball 3528 Jul 18 19:29 crtprec32.o
-rw-r--r--. 1 wball wball 3536 Jul 18 19:29 crtprec64.o
-rw-r--r--. 1 wball wball 3528 Jul 18 19:29 crtprec80.o
drwxr-xr-x. 2 wball wball 4096 Jul 18 19:29 finclude
drwxr-xr-x. 3 wball wball 4096 Jul 18 19:29 include
drwxr-xr-x. 4 wball wball 4096 Jul 21 13:35 include-fixed
drwxr-xr-x. 3 wball wball 4096 Jul 18 19:29 install-tools
-rw-r--r--. 1 wball wball 150594 Jul 18 19:29 libcaf_single.a
-rwxr-xr-x. 1 wball wball 954 Jul 18 19:29 libcaf_single.la
-rw-r--r--. 1 wball wball 5864424 Jul 18 19:29 libgcc.a
-rw-r--r--. 1 wball wball 325228 Jul 18 19:29 libgcc_eh.a
-rw-r--r--. 1 wball wball 289506 Jul 18 19:29 libgcov.a
drwxr-xr-x. 3 wball wball 4096 Jul 18 19:29 plugin
Also, if you happen to be using SDK version 23.7.1, try downloading 23.7.2 instead.