Make fails with CONFIG=Release, but works with CONFIG=Debug

I don’t know why, but making JUCE with CONFIG=Debug works, but making it with CONFIG=Release fails:

xxx@xxx-ubuntu:~/Desktop/juce/build/linux$ make CONFIG=Release
==== Building JUCE ====
Linking JUCE
ar: …/…/bin/libjuce.a: File format not recognized
make[1]: *** […/…/bin/libjuce.a] Error 1
make: *** [JUCE] Error 2

Somehow, there’s a problem with ar. But I just can’t figure out why it works when CONFIG=Debug.

Sheesh, I wouldn’t know where to begin looking for the reason for that…

it seems like a 32 / 64 bit .obj mixing. i have seen things like this when linking with libraries with different bits.

have you tried deleting the bin directory and start a fresh build ?

You mean a “make clean”? i did “make clean”, but did not empty the bin dir “by hand”. will try that.

But why would there be some 32/64 bit obj mixing in Release and not in Debug config!?

I hope this helps, because I’ve only made my first steps with Linux 2 days ago, and I don’t know much about it.

Deleting a already present libjuce.a solved the problem. The problem came because I already had libjuce.a in the bin folder, but not the Linux version, but the Mac version! And somehow, ar didn’t like that.

So I think it would be good if the mac and linux libs would have 2 different names, because if one’s using one single computer for os x, linux and windows, and all OS’es access the same bin folder, then this problem occurs.