Opened 4 years ago

Closed 5 months ago

Last modified 5 months ago

#5537 closed bug (worksforme)

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

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

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 (10)

comment:1 Changed 4 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 4 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 3 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 3 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 3 years ago by igloo

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

comment:6 Changed 3 years ago by igloo

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

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:8 Changed 10 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:9 Changed 5 months ago by thomie

  • Resolution set to worksforme
  • Status changed from new to closed

Running the testsuite the dyn way should work now, but please re-open if this is still an issue.

comment:10 Changed 5 months ago by thomie

  • Milestone 7.10.1 deleted
Note: See TracTickets for help on using tickets.