problem with libmagic component in make buildworld on 10.1-RELEASE-p9

d.hromada at d.hromada at
Thu Apr 16 11:12:33 UTC 2015

Hello world,

after upgrade from 9.3 to 10.1-RELEASE-p9 FreeBSD, I have problem with
make buildworld which always gets stuck when building libmagic

===> lib/libmagic (obj,build-tools)
cc -O2 -pipe  -DMAGIC='"/usr/share/misc/magic"' -DHAVE_CONFIG_H
-I/usr/src/lib/libmagic -I/usr/src/lib/libmagic/../../contrib/file/src
-fPIC -std=gnu99   -I/usr/obj/usr/src/tmp/legacy/usr/include
-DCOMPILE_ONLY  -L/usr/obj/usr/src/tmp/legacy/usr/lib -o mkmagic
/usr/src/lib/libmagic/../../contrib/file/src/print.c  -lz -legacy
/usr/bin/ld: //lib/ invalid DSO for symbol `_end' definition
//lib/ could not read symbols: Bad value

When I try to build the libmagic directly with make in 
/usr/src/lib/libmagic , it gets stuck during the linking:
building shared library
/usr/bin/ld: /usr/lib/libc.a(strtoull.o): relocation R_X86_64_32 against
`__xlocale_C_locale' can not be used when making a shared object;
recompile with -fPIC
/usr/lib/libc.a: could not read symbols: Bad value

I tried to put -fPIC into CFLAGS of libmagic's Makefile, but it didn't
help ;(

Thanks in advance for any idea that could help me to resolve this issue


More information about the freebsd-questions mailing list