Opened 3 years ago

Last modified 19 months ago

#5537 new bug

ghc doesn't find libffi.so.5 in testsuite

Reported by: daniel.is.fischer Owned by:
Priority: low Milestone: 7.6.2
Component: Test Suite Version: 7.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Running the testsuite, more or less every dyn test fails with

Wrong exit code (expected 0 , actual 127 )
Stdout:

Stderr:
./T5041: error while loading shared libraries: libffi.so.5: cannot open shared object file: No such file or directory

(some fail for other reasons before getting to that stage).

Running make TEST=whichever in the testsuite directory, all the tests I tried passed the dyn way, so it seems to be an issue with the testsuite-driver.

Change History (7)

comment:1 Changed 3 years ago by daniel.is.fischer

Seems the space in install dir is the troublemaker. Normally, make TEST=foo in the testsuite dir uses inplace/bin/ghc-stage2. Letting it run with TEST_HC=.../bindisttest/install dir/bin/ghc, it fails, cannot find libffi.so.5.

comment:2 Changed 3 years ago by daniel.is.fischer

Works if I copy libffi.* from libffi/dist-install/build/ to ~/lib.

So it kind of looks like a path issue, except that previously ghc was happy without any libffi.so.5. Shouldn't it load libHSffi-ghc-version.so instead of libffi.so.*?

comment:3 Changed 2 years ago by igloo

  • Milestone set to 7.4.1
  • Status changed from new to infoneeded

I recently changed how libffi is handled; does this still happen for you?

If so, can you give me an example of it failing please?

comment:4 Changed 2 years ago by daniel.is.fischer

Sorry for the delay. Actually, I think it started when the libffi handling was changed.

If I have libffi.* (the libffi.so.5 etc from the ghc tree) in ~/lib/, presumably anywhere in the library path, it gets picked up and the dyn tests generally pass. If I don't have them in the path, the dyn tests fail with

=====> T3807(normal) 1424 of 3142 [0, 0, 0]
cd ./dynlibs && $MAKE --no-print-directory -s T3807    </dev/null >T3807.run.stdout 2>T3807.run.stderr
Wrong exit code (expected 0 , actual 2 )
Stdout:
Failed to open shared library: libffi.so.5: cannot open shared object file: No such file or directory

Stderr:
gmake[3]: *** [T3807] Fehler 1

*** unexpected failure for T3807(normal)

I seem to recall that ghc does not use the system libffi. If it does, the probable cause would be that system has libffi.so.4.0.1, not 5.

comment:5 Changed 2 years ago by igloo

  • Difficulty set to Unknown
  • Status changed from infoneeded to new

comment:6 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from normal to low

comment:7 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.