I'm trying to build a C++ project on my Fedora 31 VM, but it's returning an error with regards to ld:
/usr/bin/ld: /usr/local/lib/libglog.so: undefined reference to symbol '_ZN6google14FlagRegistererC1IbEEPKcS3_S3_PT_S5_'
/usr/bin/ld: /usr/lib64/libgflags.so.2.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [proxy_ws/CMakeFiles/proxy_lws.dir/build.make:225: proxy_ws/proxy_lws] Error 1
make[1]: *** [CMakeFiles/Makefile2:1117: proxy_ws/CMakeFiles/proxy_lws.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
It's referring to a problem with libgflags, so I ran ld -lgflags --verbose
and got:
==================================================
ld: mode elf_x86_64
attempt to open /usr/x86_64-redhat-linux/lib64/libgflags.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libgflags.a failed
attempt to open /usr/lib64/libgflags.so succeeded
/usr/lib64/libgflags.so
libpthread.so.0 needed by /usr/lib64/libgflags.so
attempt to open /usr/x86_64-redhat-linux/lib64/libpthread.so.0 failed
found libpthread.so.0 at /usr/lib64/libpthread.so.0
libstdc++.so.6 needed by /usr/lib64/libgflags.so
attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so.6 failed
found libstdc++.so.6 at /usr/lib64/libstdc++.so.6
libgcc_s.so.1 needed by /usr/lib64/libgflags.so
attempt to open /usr/x86_64-redhat-linux/lib64/libgcc_s.so.1 failed
found libgcc_s.so.1 at /usr/lib64/libgcc_s.so.1
libc.so.6 needed by /usr/lib64/libgflags.so
attempt to open /usr/x86_64-redhat-linux/lib64/libc.so.6 failed
attempt to open /usr/local/lib64/libc.so.6 failed
attempt to open /usr/x86_64-redhat-linux/lib/libc.so.6 failed
attempt to open /usr/local/lib/libc.so.6 failed
attempt to open /lib/libc.so.6 failed
attempt to open /usr/lib/libc.so.6 failed
attempt to open /usr/x86_64-redhat-linux/lib64/libc.so.6 failed
found libc.so.6 at /usr/lib64/libc.so.6
ld-linux-x86-64.so.2 needed by /usr/lib64/libpthread.so.0
attempt to open /usr/x86_64-redhat-linux/lib64/ld-linux-x86-64.so.2 failed
found ld-linux-x86-64.so.2 at /usr/lib64/ld-linux-x86-64.so.2
libm.so.6 needed by /usr/lib64/libstdc++.so.6
attempt to open /usr/x86_64-redhat-linux/lib64/libm.so.6 failed
found libm.so.6 at /usr/lib64/libm.so.6
ld: warning: cannot find entry symbol _start; not setting start address
How can I fix this?