Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI on MacOS #50

Open
GitMensch opened this issue Jul 10, 2022 · 0 comments
Open

fix CI on MacOS #50

GitMensch opened this issue Jul 10, 2022 · 0 comments

Comments

@GitMensch
Copy link
Collaborator

As we now have the CI providing the necessary files we get the testsuite.log from the failing MacOS worker from https://github.com/OCamlPro/gnucobol/suites/7271491263/artifacts/292665789 - as this will go away some day here is the file from the last run: testsuite.log.

## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
Failed tests:
GnuCOBOL 3.2-dev test suite: GnuCOBOL Tests test groups:

 NUM: FILE-NAME:LINE     TEST-GROUP-NAME
      KEYWORDS

  19: used_binaries.at:722 run job after compilation
      runmisc cobcrun
  20: used_binaries.at:741 run job after compilation (path specified)
      runmisc cobcrun
  21: used_binaries.at:761 run job with optional arguments
      runmisc cobcrun
  23: used_binaries.at:813 run job after compilation from stdin
      runmisc cobc cobcrun
 819: run_file.at:5713   SEQUENTIAL file with SHARING READ ONLY
      runfile
 832: run_file.at:6618   INDEXED file with LOCK AUTOMATIC (2)
      runfile
 1084: run_extensions.at:4448 System routine SYSTEM, parameter handling
      chaining trim

checking the details we end up with system setting issues:

+dyld: Library not loaded: /usr/local/lib/libcob.4.dylib
+  Referenced from: /Users/runner/work/gnucobol/gnucobol/_build/tests/testsuite.dir/0019/./prog
+  Reason: image not found
+cobc: external process "./prog" ended with signal SIGABRT (6)

So while "cobc" runs with the correct libcob loaded (not unlikely only because the libtool generated wrapper) the programs started by cobc do not. The intention is that atlocal, which is sourced by the testsuite and therefore is exported from the environment that starts the programs (cobc in this case) does the necessary setup of all path configurations (which is also included in the testsuite log):

LD_LIBRARY_PATH="${abs_top_builddir}/libcob/.libs:$LD_LIBRARY_PATH"
PATH="${abs_top_builddir}/libcob/.libs:$PATH"
DYLD_LIBRARY_PATH="${abs_top_builddir}/libcob/.libs:$DYLD_LIBRARY_PATH"
SHLIB_PATH="${abs_top_builddir}/libcob/.libs:$SHLIB_PATH"
LIBPATH="${abs_top_builddir}/libcob/.libs:$LIBPATH"
export LD_LIBRARY_PATH PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH

Rechecking shows that MacOS disabled DYLD_LIBRARY_PATH per default via security policy (= this will only work on old systems or if explicit disabled), and the only option to execute the not yet installed libcob is to add an explicit RPATH entry for its path.

I've tried to do so with #49, if it works out the tests should likely all pass on that worker, too and I'll push that upstream (it still feels hacky, if you have any idea what to check "more" to enable/disable this hack I'd welcome any review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant