przemoc / metastore

Store and restore metadata from a filesystem.
http://software.przemoc.net/#metastore
GNU General Public License v2.0
169 stars 31 forks source link

Fails to build on Arch Linux #29

Closed edacval closed 8 years ago

edacval commented 8 years ago

Error:

gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -g -Wall -pedantic -std=c99 -D_FILE_OFFSET_BITS=64 -O2 -Wl,-O1,--sort-common,--as-needed,-z,relro -lbsd -o metastore utils.o metastore.o metaentry.o
metaentry.o: In function `mentries_dump':
~/metastore/metaentry.c:643: undefined reference to `strmode'

This was caused by the default LDFLAGS="-Wl,--as-needed" on Arch Linux, Gentoo and, guess, many other modern distributions.

According to https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order, libraries must be passed to linker after the object files and the static archives.

przemoc commented 8 years ago

Thanks for the report. The fix has been pushed.