Skip to content

build failures on ARM linux with gcc4.5

On Ubuntu, since switching to gcc4.5 ARM builds fail when linking. Here's an instance of a failure (look for 'Invalid') http://launchpadlibrarian.net/58068323/buildlog_ubuntu-natty-armel.haskell-filestore_0.3.4.2-1_FAILEDTOBUILD.txt.gz

the ghc unix .a file refers to sem_post which is in pthread.

Adding -lpthread at the end of the generated gcc command line makes it work, and the resulting executable is linked to pthread. On x86 lpthread may come in anyway because of slightly different symbols in the linked DSOs.

-no-add-needed is the flag that is newly passed by gcc 4.5 (I am not sure if by default or an Ubuntu setting) but it causes only libs that are directly linked to end up in the final executable.

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information