in reply to Issue: Encode.so: undefined symbol: PL_utf8skip

. I can see the symbol is there when I do:

No, PL_utf8skip is only used there, its not defined there, PL_utf8skip comes from libperl516.so

To see how dlls depend on each other use ldd -v ...so / ldd -v ..so like this (also includes other tips)

  • Comment on Re: Issue: Encode.so: undefined symbol: PL_utf8skip

Replies are listed 'Best First'.
Re^2: Issue: Encode.so: undefined symbol: PL_utf8skip
by losintikfos (Novice) on Jul 24, 2015 at 11:10 UTC
    Thanks.

    I was hoping that libperl.so located in the standard library directory /usr/lib will get resolved by the link flag -lperl and hence make the symbol PL_utf8skip available.

    ldd -v /usr/local/lib/perl/5.18.2/auto/Encode/Encode.so

    Results:

    	linux-vdso.so.1 =>  (0x00007ffcacdc7000)
    	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7c44f87000)
    	/lib64/ld-linux-x86-64.so.2 (0x00007f7c45555000)
    
    	Version information:
    	/usr/local/lib/perl/5.18.2/auto/Encode/Encode.so:
    		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
    	/lib/x86_64-linux-gnu/libc.so.6:
    		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
    		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    

      Well, for whatever reason, Encode.so doesn't appear linked to libperl.so ... thats weird, do the other .so's link to libperl? Like pymechanize.o or whatever it is you're generating?

        So basically when I investigate my output dynamic library - this is what I get:

        ldd -v build/lib.linux-x86_64-3.4/pymechanize.cpython-34m.so

        	linux-vdso.so.1 =>  (0x00007ffd157f3000)
        	libperl.so.5.18 => /usr/lib/libperl.so.5.18 (0x00007f9632000000)
        	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9631de2000)
        	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9631a1d000)
        	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9631819000)
        	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9631513000)
        	libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f96312da000)
        	/lib64/ld-linux-x86-64.so.2 (0x00007f96325b0000)
        
        	Version information:
        	build/lib.linux-x86_64-3.4/pymechanize.cpython-34m.so:
        		libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
        		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        	/usr/lib/libperl.so.5.18:
        		libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2
        		libcrypt.so.1 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libcrypt.so.1
        		libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
        		libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
        		libc.so.6 (GLIBC_2.11) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        	/lib/x86_64-linux-gnu/libpthread.so.0:
        		ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2
        		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
        		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        	/lib/x86_64-linux-gnu/libc.so.6:
        		ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
        		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
        	/lib/x86_64-linux-gnu/libdl.so.2:
        		ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
        		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        	/lib/x86_64-linux-gnu/libm.so.6:
        		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        	/lib/x86_64-linux-gnu/libcrypt.so.1:
        		libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
        		libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        
        As you can see Encode.so link definition clearly shows a dependency to libperl.so and so is my library pymechanize.cpython-34m.so - but somehow my library do not seems to load and package libperl.so well during linkage - to make its required symbols available to dependable libraries such as encode. Strange one.