Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2017 19:44:47 +0300
From:      Gleb Popov <6yearold@gmail.com>
To:        blubee blubeeme <gurenchan@gmail.com>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: ports with no SONAME
Message-ID:  <CALH631=WqitafhYpNL0f%2Beo-%2BAJgabrnR_4Q0k7M_OQ8HL%2BQ_g@mail.gmail.com>
In-Reply-To: <CALM2mEm1pGA0Zb6xHgvhPHkj0g6uzsLr2MESERJ%2BeWcK-SemCw@mail.gmail.com>
References:  <CALM2mE=Fw1oe2w3p_MvODR-uhSOn5DyjSrgN8WMTdNb_Ek9iWQ@mail.gmail.com> <CALM2mE=UzO3LPjoKNXg6hWhccjqdUZx_oghutv4jocgSb-D5yg@mail.gmail.com> <CALM2mEm1pGA0Zb6xHgvhPHkj0g6uzsLr2MESERJ%2BeWcK-SemCw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 30, 2017 at 7:17 PM, blubee blubeeme <gurenchan@gmail.com>
wrote:

> Can anyone help with this library. I ran objdump on it and got this output
> ----------------------------------------------
> objdump -x work/stage/usr/local/lib/libtogl.so
>
> work/stage/usr/local/lib/libtogl.so:     file format elf64-x86-64-freebsd
> work/stage/usr/local/lib/libtogl.so
> architecture: i386:x86-64, flags 0x00000150:
> HAS_SYMS, DYNAMIC, D_PAGED
> start address 0x0000000000002980
>
> Program Header:
>     LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr
> 0x0000000000000000 align 2**21
>          filesz 0x00000000000070a8 memsz 0x00000000000070a8 flags r-x
>     LOAD off    0x00000000000070b0 vaddr 0x00000000002070b0 paddr
> 0x00000000002070b0 align 2**21
>          filesz 0x0000000000000a58 memsz 0x0000000000002a90 flags rw-
>  DYNAMIC off    0x00000000000070f0 vaddr 0x00000000002070f0 paddr
> 0x00000000002070f0 align 2**3
>          filesz 0x0000000000000150 memsz 0x0000000000000150 flags rw-
>    STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr
> 0x0000000000000000 align 2**3
>          filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
>
> Dynamic Section:
>   NEEDED      libX11.so.6
>   NEEDED      libGL.so.1
>   NEEDED      libXmu.so.6
>   HASH        0x120
>   STRTAB      0xe60
>   SYMTAB      0x458
>   STRSZ       0x60b
>   SYMENT      0x18
>   PLTGOT      0x207258
>   PLTRELSZ    0x558
>   PLTREL      0x7
>   JMPREL      0x2088
>   RELA        0x1470
>   RELASZ      0xc18
>   RELAENT     0x18
>   RELACOUNT   0x80
>
> Sections:
> Idx Name          Size      VMA               LMA               File off
>  Algn
>   0 .hash         00000338  0000000000000120  0000000000000120  00000120
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   1 .dynsym       00000a08  0000000000000458  0000000000000458  00000458
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   2 .dynstr       0000060b  0000000000000e60  0000000000000e60  00000e60
>  2**0
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   3 .rela.dyn     00000c18  0000000000001470  0000000000001470  00001470
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   4 .rela.plt     00000558  0000000000002088  0000000000002088  00002088
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   5 .plt          000003a0  00000000000025e0  00000000000025e0  000025e0
>  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   6 .text         0000350f  0000000000002980  0000000000002980  00002980
>  2**4
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   7 .rodata       00000a6d  0000000000005e90  0000000000005e90  00005e90
>  2**4
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   8 .eh_frame     000007a8  0000000000006900  0000000000006900  00006900
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   9 .data.rel.ro  00000040  00000000002070b0  00000000002070b0  000070b0
>  2**4
>                   CONTENTS, ALLOC, LOAD, DATA
>  10 .dynamic      00000150  00000000002070f0  00000000002070f0  000070f0
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  11 .got          00000018  0000000000207240  0000000000207240  00007240
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  12 .got.plt      000001e0  0000000000207258  0000000000207258  00007258
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  13 .data         000006c8  0000000000207440  0000000000207440  00007440
>  2**4
>                   CONTENTS, ALLOC, LOAD, DATA
>  14 .bss          00002030  0000000000207b10  0000000000207b10  00007b08
>  2**4
>                   ALLOC
>  15 .comment      00000055  0000000000000000  0000000000000000  00007b08
>  2**0
>                   CONTENTS, READONLY
> SYMBOL TABLE:
> no symbols
>
> running the same code on libjpeg i see the SONAME field.
>
>  objdump -x /usr/local/lib/libjpeg.so
>
> /usr/local/lib/libjpeg.so:     file format elf64-x86-64-freebsd
> /usr/local/lib/libjpeg.so
> architecture: i386:x86-64, flags 0x00000150:
> HAS_SYMS, DYNAMIC, D_PAGED
> start address 0x0000000000004860
>
> Program Header:
>     LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr
> 0x0000000000000000 align 2**21
>          filesz 0x000000000007094c memsz 0x000000000007094c flags r-x
>     LOAD off    0x0000000000071000 vaddr 0x0000000000271000 paddr
> 0x0000000000271000 align 2**21
>          filesz 0x0000000000000c40 memsz 0x0000000000000c48 flags rw-
>  DYNAMIC off    0x00000000000715c0 vaddr 0x00000000002715c0 paddr
> 0x00000000002715c0 align 2**3
>          filesz 0x00000000000001c0 memsz 0x00000000000001c0 flags rw-
> EH_FRAME off    0x000000000006c8c0 vaddr 0x000000000006c8c0 paddr
> 0x000000000006c8c0 align 2**2
>          filesz 0x0000000000000bcc memsz 0x0000000000000bcc flags r--
>    STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr
> 0x0000000000000000 align 2**3
>          filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
>
> Dynamic Section:
>   NEEDED      libc.so.7
>   SONAME      libjpeg.so.8
>   INIT        0x4398
>   FINI        0x49388
>   HASH        0x158
>   GNU_HASH    0x5d8
>   STRTAB      0x18f8
>   SYMTAB      0xa88
>   STRSZ       0xa79
>   SYMENT      0x18
>   PLTGOT      0x2719c0
>   PLTRELSZ    0x6f0
>   PLTREL      0x7
>   JMPREL      0x3ca8
>   RELA        0x2520
>   RELASZ      0x1788
>   RELAENT     0x18
>   VERDEF      0x24a8
>   VERDEFNUM   0x3
>   VERNEED     0x2500
>   VERNEEDNUM  0x1
>   VERSYM      0x2372
>   RELACOUNT   0xdd
>
> Version definitions:
> 1 0x01 0x0cca1178 libjpeg.so.8
> 2 0x00 0x0939efd0 LIBJPEGTURBO_8.0
> 3 0x00 0x04cdfde0 LIBJPEG_8.0
>
> Version References:
>   required from libc.so.7:
>     0x077a28b0 0x00 04 FBSD_1.0
>
> Sections:
> Idx Name          Size      VMA               LMA               File off
>  Algn
>   0 .hash         0000047c  0000000000000158  0000000000000158  00000158
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   1 .gnu.hash     000004ac  00000000000005d8  00000000000005d8  000005d8
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   2 .dynsym       00000e70  0000000000000a88  0000000000000a88  00000a88
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   3 .dynstr       00000a79  00000000000018f8  00000000000018f8  000018f8
>  2**0
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   4 .gnu.version  00000134  0000000000002372  0000000000002372  00002372
>  2**1
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   5 .gnu.version_d 00000054  00000000000024a8  00000000000024a8  000024a8
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   6 .gnu.version_r 00000020  0000000000002500  0000000000002500  00002500
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   7 .rela.dyn     00001788  0000000000002520  0000000000002520  00002520
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   8 .rela.plt     000006f0  0000000000003ca8  0000000000003ca8  00003ca8
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   9 .init         00000013  0000000000004398  0000000000004398  00004398
>  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>  10 .plt          000004b0  00000000000043ac  00000000000043ac  000043ac
>  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>  11 .text         00044b28  0000000000004860  0000000000004860  00004860
>  2**4
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>  12 .fini         0000000e  0000000000049388  0000000000049388  00049388
>  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>  13 .rodata       00023520  00000000000493a0  00000000000493a0  000493a0
>  2**4
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>  14 .eh_frame_hdr 00000bcc  000000000006c8c0  000000000006c8c0  0006c8c0
>  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>  15 .eh_frame     000034bc  000000000006d490  000000000006d490  0006d490
>  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>  16 .ctors        00000010  0000000000271000  0000000000271000  00071000
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  17 .dtors        00000010  0000000000271010  0000000000271010  00071010
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  18 .jcr          00000008  0000000000271020  0000000000271020  00071020
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  19 .data.rel.ro  00000590  0000000000271030  0000000000271030  00071030
>  2**4
>                   CONTENTS, ALLOC, LOAD, DATA
>  20 .dynamic      000001c0  00000000002715c0  00000000002715c0  000715c0
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  21 .got          00000240  0000000000271780  0000000000271780  00071780
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  22 .got.plt      00000268  00000000002719c0  00000000002719c0  000719c0
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  23 .data         00000018  0000000000271c28  0000000000271c28  00071c28
>  2**3
>                   CONTENTS, ALLOC, LOAD, DATA
>  24 .bss          00000008  0000000000271c40  0000000000271c40  00071c40
>  2**2
>                   ALLOC
>  25 .comment      000000e1  0000000000000000  0000000000000000  00071c40
>  2**0
>                   CONTENTS, READONLY
> SYMBOL TABLE:
> no symbols
>
>
> How can I edit the makefile to add the soname to the lib?
>
> On Mon, Oct 30, 2017 at 11:52 PM, blubee blubeeme <gurenchan@gmail.com>
> wrote:
>
> > Seems like the soname issue has to do with the linker flags set during
> the
> > compilation process.
> >
> > On Mon, Oct 30, 2017 at 7:37 PM, blubee blubeeme <gurenchan@gmail.com>
> > wrote:
> >
> >> There's an unmaintained port [graphics/togl] that I need but doing
> >> stage-qa on my port it says this needed port has no SONAME.
> >>
> >> Since the togl is unmaintained I'll like to fix it. This port does a lot
> >> of stuff like this:
> >>
> >> # do-install:
> >> # @${MKDIR} ${STAGEDIR}${TOGL_INSTDIR}
> >> # .for i in togl.h togl_ws.h pkgIndex.tcl
> >> # ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${TOGL_INSTDIR}
> >> # .endfor
> >> # ${INSTALL_LIB} ${WRKSRC}/libTogl1.7.so ${STAGEDIR}${TOGL_INSTDIR}
> >> # ${LN} -s libTogl1.7.so  ${STAGEDIR}${TOGL_INSTDIR}/libtogl.so.1
> >> # ${LN} -s ${TOGL_INSTDIR}/libTogl1.7.so  ${STAGEDIR}${PREFIX}/lib/libt
> >> ogl.so
> >> # ${LN} -s ${TOGL_INSTDIR}/libTogl1.7.so  ${STAGEDIR}${PREFIX}/lib/libt
> >> ogl.so.1
> >>
> >> # do-install-DOCS-on:
> >> # @${MKDIR} ${STAGEDIR}${DOCSDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/Togl.html ${STAGEDIR}${DOCSDIR}
> >>
> >> # do-install-EXAMPLES-on:
> >> # @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/Makefile ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/ben.rgb ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/double.c ${WRKSRC}/double.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/gears.c ${WRKSRC}/gears.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/image.c ${WRKSRC}/image.h
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/index.c ${WRKSRC}/index.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/overlay.c ${WRKSRC}/overlay.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/stereo.c ${WRKSRC}/stereo.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/texture.c ${WRKSRC}/texture.tcl
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/togl.c ${WRKSRC}/togl.h
> >> ${STAGEDIR}${EXAMPLESDIR}
> >> # ${INSTALL_DATA} ${WRKSRC}/tree2.rgba ${STAGEDIR}${EXAMPLESDIR}
> >>
> >> I think this is the reason it's not registering the SONAME because of
> >> those commands but I'm not sure.
> >>
> >> I ask because reading the porter handbook on installing ports there's a
> >> Makefile macro ${COPYTREE_SHARE} but there's a warning that using that
> >> macro doesn't add the files to pkg-plist, you have to manually do that.
> >>
> >> Anyways, that's a long way to say how can I rework this project to make
> >> sure all files are installed and registered properly?
> >>
> >
> >
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
>

-Wl,-soname,libfoo.so.0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631=WqitafhYpNL0f%2Beo-%2BAJgabrnR_4Q0k7M_OQ8HL%2BQ_g>