| Summary: | Compilation of databases/tokyocabinet 1.4.48 on FreeBSD 10.1 fails with cc: error: unknown argument: '-fforce-addr' (CLANG) | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | sebastian |
| Component: | Individual Port(s) | Assignee: | Jun Kuriyama <kuriyama> |
| Status: | Closed Overcome By Events | ||
| Severity: | Affects Some People | CC: | sebastian, w.schwarzenfeld |
| Priority: | --- | ||
| Version: | Latest | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
sebastian
2015-04-12 08:29:13 UTC
Hmm, I can build this port on 10.1. What options do you choose? Hi, what specific options/files do you need other than the ones displayed in the extract I provided? Kind regards Sebastian Hi,
just to add onto this. So it seems that clang does not support fforce-addr and as such building tokyocabinet fails to build. Removing the flag from the Makefile does result in a number of compilation errors:
[root@bla /usr/ports/databases/tokyocabinet/work/tokyocabinet-1.4.48]# make MAKE_JOBS_UNSAFE=yes
cc -c -I. -I/usr/local/include -I/usr/ports/databases/tokyocabinet/work/include -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__ -UNDEBUG -UNDEBUG -D_MYFASTEST -D_MYSWAB -D_MYMICROYIELD -D_MYEXLZMA -D_MYEXLZO -D_TC_PREFIX="\"/usr/local\"" -D_TC_INCLUDEDIR="\"/usr/local/include\"" -D_TC_LIBDIR="\"/usr/local/lib\"" -D_TC_BINDIR="\"/usr/local/bin\"" -D_TC_LIBEXECDIR="\"/usr/local/libexec\"" -D_TC_APPINC="\"-I/usr/local/include\"" -D_TC_APPLIBS="\"-L/usr/local/lib -ltokyocabinet -llzo2 -llzma -lbz2 -lz -lrt -lpthread -lm -lc \"" -pipe -g -fstack-protector -fno-strict-aliasing -std=c99 -Wall -fPIC -pedantic -fsigned-char -O3 -fomit-frame-pointer -minline-all-stringops tokyocabinet_all.c
tokyocabinet_all.c:123:5: warning: variable 'swap' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
if(!(swap = MYREALLOC(buf, asiz))){
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./myconf.h:423:6: note: expanded from macro 'if'
if((((++_tc_dummy_cnt) & (0x100 - 1)) != 0 || (sched_yield() * 0) == 0) && (TC_cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tokyocabinet_all.c:128:11: note: uninitialized use occurs here
buf = swap;
^~~~
tokyocabinet_all.c:123:5: note: remove the '&&' if its condition is always true
if(!(swap = MYREALLOC(buf, asiz))){
^
./myconf.h:423:6: note: expanded from macro 'if'
if((((++_tc_dummy_cnt) & (0x100 - 1)) != 0 || (sched_yield() * 0) == 0) && (TC_cond))
^
tokyocabinet_all.c:122:15: note: initialize the variable 'swap' to silence this warning
char *swap;
^
= NULL
(...)
Are you not having the same issue? Which compiler are you using? Any special flags?
Thanks.
Kind regards
Sebastian
IMHO tokyocabinet compiles fine. Maintainer feedback please! I think this could be closed. |