msg-byu / enumlib

Derivative structure enumeration library
MIT License
59 stars 34 forks source link

Compiling error for enum.x #122

Closed jywang17 closed 2 months ago

jywang17 commented 4 months ago

The compiling works fine until running into this error when compiling enum.x on a macOS with M1 chip:

make enum.x

/Library/Developer/CommandLineTools/usr/bin/make -C ../symlib/src make[1]: Nothing to be done for all'. sed -i.bak "s/\(write(23,'(A)')\)\(.*\)/\1 \"git describe --tags --dirty --abbrev=4`\"/" derivative_structure_generator.f90 gfortran -fPIC -g -fbounds-check -ffree-line-length-none -fno-underscoring -I../symlib/src -c derivative_structure_generator.f90 gfortran -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-rpath,/Users/jy/miniforge3/envs/py310/lib -L/Users/jy/miniforge3/envs/py310/lib -o enum.x sorting.o enumeration_types.o io_utils.o arrow_related.o tree_class.o labeling_related.o enumeration_routines.o derivative_structure_generator.o enumeration_utilities.o driver.o ../symlib/src/libcomparestructs.a ../symlib/src/libutils.a ../symlib/src/libsym.a ../symlib/src/librational.a ../symlib/src/libcombinatorics.a ld: library not found for -lm collect2: error: ld returned 1 exit status make: *** [enum.x] Error 1

It seems that the complier cannot find the math libm?

Thanks!

glwhart commented 4 months ago

Did you compile symlib first? Did it compile successfully?

Gus Hart Professor, Physics and Astronomy Biophysics Group http://bsg.byu.edu http://msg.byu.edu

On Thu, May 23, 2024 at 7:57 AM jywang17 @.***> wrote:

The compiling works fine until running into this error when compiling enum.x on a macOS with M1 chip:

make enum.x

/Library/Developer/CommandLineTools/usr/bin/make -C ../symlib/src make[1]: Nothing to be done for all'. sed -i.bak "s/(write(23,'(A)'))(.*)/\1 \"git describe --tags --dirty --abbrev=4`"/" derivative_structure_generator.f90 gfortran -fPIC -g -fbounds-check -ffree-line-length-none -fno-underscoring -I../symlib/src -c derivative_structure_generator.f90 gfortran -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-rpath,/Users/jy/miniforge3/envs/py310/lib -L/Users/jy/miniforge3/envs/py310/lib -o enum.x sorting.o enumeration_types.o io_utils.o arrow_related.o tree_class.o labeling_related.o enumeration_routines.o derivative_structure_generator.o enumeration_utilities.o driver.o ../symlib/src/libcomparestructs.a ../symlib/src/libutils.a ../symlib/src/libsym.a ../symlib/src/librational.a ../symlib/src/libcombinatorics.a ld: library not found for -lm collect2: error: ld returned 1 exit status make: *** [enum.x] Error 1

It seems that the complier cannot find the math libm?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/msg-byu/enumlib/issues/122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3UNGBL6CCBHNXA432A2ELZDXYSVAVCNFSM6AAAAABIFW6YE2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTGMBQGA2TAMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jywang17 commented 4 months ago

Thank you Prof. Hart.

Yes I followed the instructions and compiled the symlib first. It was compiled successfully. Anyway, this error was mysteriously solved after I reinstall the Xcode Command Line Tools.

On Thu, May 23, 2024 at 10:49 PM Gus Hart @.***> wrote:

Did you compile symlib first? Did it compile successfully?

Gus Hart Professor, Physics and Astronomy Biophysics Group http://bsg.byu.edu http://msg.byu.edu

On Thu, May 23, 2024 at 7:57 AM jywang17 @.***> wrote:

The compiling works fine until running into this error when compiling enum.x on a macOS with M1 chip:

make enum.x

/Library/Developer/CommandLineTools/usr/bin/make -C ../symlib/src make[1]: Nothing to be done for all'. sed -i.bak "s/(write(23,'(A)'))(.*)/\1 \"git describe --tags --dirty --abbrev=4`"/" derivative_structure_generator.f90 gfortran -fPIC -g -fbounds-check -ffree-line-length-none -fno-underscoring -I../symlib/src -c derivative_structure_generator.f90 gfortran -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-rpath,/Users/jy/miniforge3/envs/py310/lib -L/Users/jy/miniforge3/envs/py310/lib -o enum.x sorting.o enumeration_types.o io_utils.o arrow_related.o tree_class.o labeling_related.o enumeration_routines.o derivative_structure_generator.o enumeration_utilities.o driver.o ../symlib/src/libcomparestructs.a ../symlib/src/libutils.a ../symlib/src/libsym.a ../symlib/src/librational.a ../symlib/src/libcombinatorics.a ld: library not found for -lm collect2: error: ld returned 1 exit status make: *** [enum.x] Error 1

It seems that the complier cannot find the math libm?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/msg-byu/enumlib/issues/122, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB3UNGBL6CCBHNXA432A2ELZDXYSVAVCNFSM6AAAAABIFW6YE2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTGMBQGA2TAMA>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/msg-byu/enumlib/issues/122#issuecomment-2127330671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOG5WMFUCZMW3HOR5OMGDH3ZDX6YDAVCNFSM6AAAAABIFW6YE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGMZTANRXGE . You are receiving this because you authored the thread.Message ID: @.***>

-- Jingyang Wang Nanjing University