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

make error adding symbols: archive has no index; run ranlib to add one #67

Open
nguyenvulong opened this issue Sep 12, 2023 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@nguyenvulong
Copy link
Owner

I got this error while building httpd, but this might still help if you are working on something else.

Quick steps to reproduce
Run ld server/.libs/libmain.a, which is the file in the error message
Output /usr/bin/ld: server/.libs/libmain.a: error adding symbols: archive has no index; run ranlib to add one

Original steps that I got the error

./configure AR=llvm-ar CC=clang CXX=clang++ LD=/usr/bin/ld CFLAGS="-flto -O0" CXXFLAGS="-flto -O0" LDFLAGS="-flto -Wl,-plugin-opt=save-temps"
make

The error occurred after running make.
But I fixed it by removing LD=/usr/bin/ld from the ./configure command parameters.

I guess it has something to do with my LD=/usr/bin/ld, but I am not sure since I already re-installed ld but it's not fixed.
Could be because my server is a mess of different broken packages. Not sure.

@nguyenvulong nguyenvulong added bug Something isn't working documentation Improvements or additions to documentation labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant