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

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...

Replies are listed 'Best First'.
Re^6: How To Link -lperl to Extensions During Build
by cyd (Novice) on May 13, 2015 at 01:00 UTC

    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

Re^6: How To Link -lperl to Extensions During Build
by cyd (Novice) on May 14, 2015 at 18:13 UTC

    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.

        Here's where I apologize for my lack of knowledge

        And here's where I ask, when you say 'build script' what do you mean? Isn't the ./Configure and make that I;m doing to build perl a script. Or do just want a log of the build?

        NOTE: Went ahead and added the ./Configure && other commands to a shell script and am running it now as build.sh >&1 | tee log

        Also, to clarify, make fails before finishing with the error I posted earlier. I never get to the point where I can run make install