jacobdufault / cquery

C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more
MIT License
2.35k stars 163 forks source link

Symlink for libatomic needed on Centos 7 #382

Closed Will-W closed 6 years ago

Will-W commented 6 years ago

"Out of the box" building on Centos 7 produces the following linker error: /usr/bin/ld: cannot find -latomic

This is despite libatomic being installed in the standard packages. It appears that the CentOS package does not produce a libatomic.so, just a .so.1 and .so.1.0.0

A symlink for libatomic.so ->libatomic.so.1 and then ldconfig fixed the build issue.

I don't know if this needs a fix for the build system, or just a documentation update, but I assume it would be a common hurdle.

For reference: Centos 7 g++ 5.3.1 64 bit

MaskRay commented 6 years ago

does libatomic-devel provide the libatomic-devel.so symlink? atomic operations may not be supported by hardware instructions or the os and whether it is supported is hard to know.

then update the wiki for prerequisite packages on centos

On Jan 31, 2018 03:36, "Will" notifications@github.com wrote:

"Out of the box" building on Centos 7 produces the following linker error: /usr/bin/ld: cannot find -latomic

This is despite libatomic being installed in the standard packages. It appears that the CentOS package soes produce a libatomic.so, just a .so.1 and .so.1.0.0

A symlink for libatomic.so ->libatomic.so.1 and then ldconfig fixed the build issue.

I don't know if this is a fix for the build system, or just a documentation update, but I assume would be a common hurdle.

For reference: Centos 7 g++ 5.3.1 64 bit

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cquery-project/cquery/issues/382, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZaQp9JVnNFaODX-H6mJ2taSYwdIhWBks5tQFBHgaJpZM4Rz1I- .

Will-W commented 6 years ago

There is no libatomic-devel. There's libatomic_ops-devel.x86_64, which appears to provide static libraries (plus headers/sources) and libatomic-static which jus t provides one .a under /usr/lib/gcc. It's a bit of an odd situation.

I'll put something in the wiki.

MaskRay commented 6 years ago

Thanks. Last time @papadokolos reported undefined referenced link error in https://github.com/cquery-project/cquery/issues/361 , which was also due to libatomic.so. Because whether -latomic is needed is difficult to detect, I decided to enforce -latomic which should do no harm on systems with -latomic.

mcepl commented 6 years ago

So, why is this ticket closed when I still have to make manually symlink from libatomic.so.1 to libatomic.so? Besides ./waf configure didn’t find out libatomic has not been installed at all.

MaskRay commented 6 years ago

maybe remove -latomic from wscript and ask users to use LDFLAGS=-latomic ./waf configure when it fails to link