Page 1 of 1

Static lib build error - ar not able to find @"libxxx.txt"

Posted: Mon Aug 15, 2016 10:40 am
by ssawgift
I'm quite puzzled by this error. The compilation works that proves the relative directory works, but ar fails.

----------Building project:[ libsqlite - Debug ]----------
/usr/bin/gcc -c "/Users/account/Code/git/github.com/macOS/c/sqlite/src/sqlite3.c" -g -DSQLITE_HAS_CODEC -o ./Debug/sqlite3.c.o -I.
/usr/bin/ar rcu ./Debug/libsqlite.a @"libsqlite.txt"
ar: @libsqlite.txt: No such file or directory
make[1]: *** [Debug/libsqlite.a] Error 1

My platform is macOS (Sierra beta 5).

Re: Static lib build error - ar not able to find @"libxxx.tx

Posted: Mon Aug 15, 2016 10:48 am
by ssawgift
Ah, I think I found a bug.

If I turn off "Pass object list to the linker via file" in my compiler, I can successfully build the static library.

Re: Static lib build error - ar not able to find @"libxxx.tx

Posted: Wed Aug 17, 2016 10:10 am
by eranif
Its not a bug.
You are using an outdated ar utility.

Eran

Re: Static lib build error - ar not able to find @"libxxx.tx

Posted: Wed Aug 17, 2016 9:20 pm
by ssawgift
eranif wrote:Its not a bug.
You are using an outdated ar utility.

Eran
Okay, I'm really surprised. I'm using the latest macOS and Xcode (beta 6), but not sure why the ar is outdated.

Re: Static lib build error - ar not able to find @"libxxx.tx

Posted: Fri Aug 19, 2016 2:20 pm
by eranif
this bug is always reported on OSX, (it works on Linux and windows)
I suspect that Apple's ar fork is broken