Ticket #4204 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Link-Time Undefined Reference Errors

Reported by: pgj Owned by: igloo
Priority: normal Milestone:
Component: Runtime System Version: 6.13
Keywords: Cc:
Operating System: FreeBSD Architecture: Unknown/Multiple
Type of failure: Other Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

An undefined reference error is generated on FreeBSD at linking time when using dynamic libraries. It is because of the visibility attributes of GCC. FreeBSD 8.x includes GCC 4.2.1 in the base system, which behaves badly when the #pragma GCC visibility push(hidden) line is present, it might refer to an OS-specific error.

Regarding the given problem, here is an excerpt from the testing log on FreeBSD:

=====> arith001(dyn) 624 of 2520 [0, 43, 0]
cd ./numeric/should_run && '/usr/home/ghc-builder/work/builder/tempbuild/build/bindisttest/install dir/bin/ghc' -fforce-recomp -dcore-lint -dcmm-lint -no-user-package-conf -rtsopts -dno-debug-output -o arith001 arith001.hs -O -dynamic >arith001.comp.stderr 2>&1
Compile failed (status 256) errors were:
[1 of 1] Compiling Main ( arith001.hs, arith001.o )
Linking arith001 ...
/usr/home/ghc-builder/work/builder/tempbuild/build/bindisttest/install dir/lib/ghc-6.13.20100717/unix-2.4.0.1/libHSunix-2.4.0.1-ghc6.13.20100717.so: undefined reference to `genericRaise'
*** unexpected failure for arith001(dyn)

It happens for both  i386 and  amd64.

Attachments

freebsd-gcc-visibility.diff Download (1.0 KB) - added by pgj 3 years ago.
A patch for fixing symbol visibility problems on FreeBSD

Change History

Changed 3 years ago by pgj

A patch for fixing symbol visibility problems on FreeBSD

Changed 3 years ago by pgj

  • status changed from new to patch

Changed 3 years ago by igloo

  • owner set to igloo

Changed 3 years ago by igloo

  • status changed from patch to closed
  • resolution set to fixed

Patch applied, thanks!

Note: See TracTickets for help on using tickets.