-
Notifications
You must be signed in to change notification settings - Fork 94
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
[BUG]collect2: error: ld returned 1 exit status #241
Comments
I've seen this happen when there's an extra space at the end of the line in the machine file where you specify the library directories. The make system adds a |
Hi, Thank you. The compiling process moved forward a bit but stopped at Compiling uuid/uuid_time.c. /cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/binutils/2.38-GCCcore-11.3.0/bin/ld: error: /lib: read: Is a directory My machine file is written here: |
You have to give the directory where HDF5 lives on your machine in the variable |
Hi, Thanks for the reply. But unfortunately it still didn't work after I specified HDF5 path. This is what I did: Is there anything else I can do? |
Can you upload the original out.compile file in plain text? Also could you reupload your machine file in plain text instead of a PDF since it's easier to find any problems that way. You can use pastebin.com if it's easier for you. |
This is my out.compile: This is my makefile (Make.machine.linux-gnu): FILE: Make.mach.linux-gnuDESCRIPTION: Makefile settings for a linux machineAUTHOR: Rick Wagner ([email protected])DATE: 2008-09-16 (updated 2019-09-11)Depending on your linux distribution several packages need to be installedto satisfy the minimum Enzo requirements (GNU compiler suite withgfortran/gcc/g++, an MPI library for parallel runs, and HDF5 for data outputs).Sample environmentsUbuntu/Debian (see also Make.mach.ubuntu):$ apt-get install build-essentials gfortran libhdf5-10 libopenmpi-dev openmpi-binFedora/Redhat:$ yum install make automake gcc gcc-c++ gcc-gfortran kernel-devel openmpi openmpi-develArch Linux:$ pacman -S base-devel gcc-fortran openmpi hdf5#======================================================================= MACH_TEXT = Generic GNU/Linux machine file. Requires gfortran/gcc/g++, OpenMPI, and a #----------------------------------------------------------------------- Install paths (local variables)#----------------------------------------------------------------------- LOCAL_HDF5_INSTALL = /cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/HDF5/1.14.3-gompi-2023b # mandatory #----------------------------------------------------------------------- Compiler settings#----------------------------------------------------------------------- MACH_CPP = cpp # C preprocessor command With MPIMACH_CC_MPI = mpicc # C compiler when using MPI Without MPIMACH_CC_NOMPI = gcc # C compiler when not using MPI #----------------------------------------------------------------------- Machine-dependent defines#----------------------------------------------------------------------- MACH_DEFINES = -DLINUX -DH5_USE_16_API #----------------------------------------------------------------------- Compiler flag settings#----------------------------------------------------------------------- MACH_CPPFLAGS = -P -traditional #----------------------------------------------------------------------- Optimization flags#----------------------------------------------------------------------- MACH_OPT_WARN = -Wall -g #----------------------------------------------------------------------- Includes#----------------------------------------------------------------------- LOCAL_INCLUDES_MPI = # MPI includes MACH_INCLUDES = $(LOCAL_INCLUDES_HDF5) #----------------------------------------------------------------------- Libraries#----------------------------------------------------------------------- LOCAL_LIBS_MPI = # MPI libraries MACH_LIBS = |
Describe the bug
A clear and concise description of what the bug is.
I had ``make: *** [Makefile:135: enzo.exe] Error 1'' while compiling make-linux-gnu with GCCcore/11.3.0, OpenMPI/4.1.4-GCC-11.3.0, HDF5/1.12.2-gompi-2022a
when I did ``cat out.compile'', it said:
/cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/binutils/2.38-GCCcore-11.3.0/bin/ld: error: /lib: read: Is a directory
collect2: error: ld returned 1 exit status
I was running on computer cluster.
And FYI, I followed the step as #167 suggested:
add -std=legacy to MACH_FFLAGS
add -std=legacy to the MACH_F90FLAGS
Thank you for your help.
The text was updated successfully, but these errors were encountered: