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

General questions regarding the usage of CodeLite
ssawgift
CodeLite Enthusiast
Posts: 17
Joined: Mon Apr 11, 2016 5:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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).
ssawgift
CodeLite Enthusiast
Posts: 17
Joined: Mon Apr 11, 2016 5:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif »

Its not a bug.
You are using an outdated ar utility.

Eran
Make sure you have read the HOW TO POST thread
ssawgift
CodeLite Enthusiast
Posts: 17
Joined: Mon Apr 11, 2016 5:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif »

this bug is always reported on OSX, (it works on Linux and windows)
I suspect that Apple's ar fork is broken
Make sure you have read the HOW TO POST thread
Post Reply