in reply to Re^3: How To Link -lperl to Extensions During Build
in thread How To Link -lperl to Extensions During Build

Unfortunately make failed with the same error after running the simplified configure command.

Regarding the suggestion above, are you suggesting that I run make install even though make fails?

  • Comment on Re^4: How To Link -lperl to Extensions During Build

Replies are listed 'Best First'.
Re^5: How To Link -lperl to Extensions During Build
by Anonymous Monk on May 12, 2015 at 23:13 UTC

    Well, this is totally convoluted. The build process does not use -lperl when compiling dynamic extensions. To make it happen, I tried something like this:

    ./Configure -des -Dprefix=/foo -Duseshrplib -Alddlflags="-shared -O2 - +Wl,-E,-L/foo/lib/perl5/5.20.2/armv7l-linux-android/CORE,-as-needed,-l +perl,-no-as-needed" make libperl.so COMMA=, SHRPLDFLAGS='$(subst $(COMMA)-lperl,,$(LDDLFLA +GS))' mkdir -p /foo/lib/perl5/5.20.2/armv7l-linux-android/CORE/ cp libperl.so /foo/lib/perl5/5.20.2/armv7l-linux-android/CORE/ make; make install
    Mind you, I don't actually have an android setup to play with...

      Whoa. That IS convoluted. I'll give it a shot...I think I can work around having to make the libperl.so and just use the one I have

      Well, I believe I've finally managed to link libperl with the module that is throwing the error

      readelf output for PL_re.so

      Dynamic section at offset 0x600c4 contains 23 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libperl.so] 0x00000001 (NEEDED) Shared library: [libc.so] 0x00000001 (NEEDED) Shared library: [libdl.so] 0x00000001 (NEEDED) Shared library: [libm.so]

      Unfortunately, the original error still persists

      make[1]: Leaving directory `/bld/perl/perl-5.20.2/dist/threads-shared' LD_LIBRARY_PATH=/bld/perl/perl\-5.20.2:/data/data/jackpal.androidterm/ +kbox2/lib ./perl -Ilib -f pod/buildtoc -q Can't load 'lib/5.20.2/armv7l-linux-android/auto/re/PL_re.so' for modu +le re: dlopen failed: cannot locate symbol "Perl_bytes_to_utf8" refer +enced by "PL_re.so"... at lib/5.20.2/armv7l-linux-android/DynaLoader. +pm line 218. at lib/5.20.2/Text/Wrap.pm line 58. Compilation failed in require at lib/5.20.2/Text/Wrap.pm line 58. BEGIN failed--compilation aborted at lib/5.20.2/Text/Wrap.pm line 58. Compilation failed in require at pod/buildtoc line 7. BEGIN failed--compilation aborted at pod/buildtoc line 7. make: *** [pod/perltoc.pod] Error 2

      Should I just post this to the perl-porters maillist

        Make a small build script (from configure to install), run it after distclean >& LOG; dump that on some pastebin site.

        Script and link -> cyd's scratchpad.