0

Is there a command line option equivalent to LD_LIBRARY_PATH for linking?

I build native via native-maven-plugin which lack support for setting environment variables and setting prior to maven breaks my other modules. I need to either

  • find an alternative to native-maven-plugin (long term solution)
  • find a command line option to add required path to linker search

I've tried:

  • --library-path
  • -L
  • --rpath-link, --rpath
  • -R

Each time I continue to get the following:

/usr/bin/ld: warning: libsc_fnt.so, needed by 
...lib/libsc_ex.so, not found (try using -rpath or -rpath-link)
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135

1 Answers1

0

I found a workaround

  • Forked native-maven-plugin
  • created envFactor for gcc compiler
  • added ldLibraryParam param to mojo
  • set logic that we push value into environment if there's an envFactory and ldLibraryPath is set.
  • works on linux with only that one variation in build log

Never did figure out what compiler/linker option was the equivalent.

Peter Kahn
  • 12,364
  • 20
  • 77
  • 135