Skip to content
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

ld: -f may not be used without -shared #57

Open
CyberShadow opened this issue Dec 2, 2024 · 0 comments
Open

ld: -f may not be used without -shared #57

CyberShadow opened this issue Dec 2, 2024 · 0 comments

Comments

@CyberShadow
Copy link

CyberShadow commented Dec 2, 2024

Example won't link:

vladimir:~/work/extern/lubeck/example$ dub
    Starting Performing "debug" build using /usr/bin/dmd for x86_64.
  Up-to-date mir-core 1.7.1: target for configuration [library] is up to date.
  Up-to-date mir-algorithm 3.22.1: target for configuration [default] is up to date.
  Up-to-date mir-blas 1.1.17: target for configuration [library] is up to date.
  Up-to-date mir-lapack 1.2.12: target for configuration [library] is up to date.
  Up-to-date lubeck 1.5.4: target for configuration [library] is up to date.
    Building example ~master: building configuration [executable]
     Linking example
/bin/ld: -f may not be used without -shared
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
       cc /home/vladimir/work/extern/lubeck/example/.dub/cache/example/~master/build/executable-debug-Ht9gLbWRae3-AHjrs6xcLw/example.o -o /home/vladimir/work/extern/lubeck/example/.dub/cache/example/~master/build/executable-debug-Ht9gLbWRae3-AHjrs6xcLw/example -g -m64 -Xlinker --no-as-needed -Xlinker -fopenmp -Xlinker --export-dynamic .dub/cache/lubeck/1.5.4/build/library-debug-eutapQgVy7iOZBtJUBN6rQ/liblubeck.a .dub/cache/mir-lapack/1.2.12/build/library-debug-avDh3mkJVBR7fC1dxLXQnw/libmir-lapack.a .dub/cache/mir-blas/1.1.17/build/library-debug-bSH38pnVx5QzM2cfvDN8dg/libmir-blas.a .dub/cache/mir-algorithm/3.22.1/build/default-debug-PvGOucsL47metIN3bkd9hw/libmir-algorithm.a .dub/cache/mir-core/1.7.1/build/library-debug-NgAhtITPNFpLEI3SXDCm3Q/libmir-core.a -lopenblas -L/usr/lib -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl 
Error /usr/bin/dmd failed with exit code 1.

DMD v2.109.1 on Arch Linux x64. cc is cc (GCC) 14.2.1 20240910.

@CyberShadow CyberShadow changed the title /usr/sbin/ld: -f may not be used without -shared ld: -f may not be used without -shared Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant