[LLVMdev] linux build broken on Ubuntu 12.04 x86_64

Adam Strzelecki ono at java.pl
Tue Feb 4 15:56:40 PST 2014


Huh, I have just hit this issue today’s morning.

> Maybe a machine change? Let's take this off list for now and we can update when we figure it out. I can't duplicate it.

This issue happens only if libedit-dev is installed on Ubuntu 12.04. This leads configure to false detect HAVE_ARC4RANDOM, because libedit is being tested before arc4random, and libedit.so depends on libbsd.so. This makes arc4random check succeed, even arc4random is not declared anywhere, as plain C just assumes function existence (no args returning int), then it links with -ledit which succeeds.

So I am seeing two possible solutions:

(1) either move libedit check after arc4random, so arc4random is checked without -ledit
(2) make sure arc4random check if function is actually declared, and fail instead assuming it exists and returns int

Cheers,
-- 
Adam



More information about the llvm-dev mailing list