[Bug 210635] devel/libdlna: fix build in presence of itself

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 27 18:53:00 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210635

            Bug ID: 210635
           Summary: devel/libdlna: fix build in presence of itself
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: amdmi3 at FreeBSD.org
                CC: malus.x at gmail.com
             Flags: maintainer-feedback?(malus.x at gmail.com)
                CC: malus.x at gmail.com

Created attachment 171880
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=171880&action=edit
Patch

libdlna does not always build in presence of older version of itself in the
system:

#############################################
#         Linking shared objects            #
#############################################
cc -shared -Wl,-soname,libdlna.so.0 profiles.lo containers.lo image_jpeg.lo
image_png.lo audio_aac.lo audio_ac3.lo audio_amr.lo audio_atrac3.lo
audio_g726.lo audio_lpcm.lo audio_mp2.lo audio_mp3.lo audio_wma.lo av_mpeg1.lo
av_mpeg2.lo av_mpeg4_part2.lo av_mpeg4_part10.lo av_wmv9.lo upnp_dms.lo \
  -L/usr/local/lib -fstack-protector -lavformat -lavcodec -o libdlna.so.0.2.3
ln -sf libdlna.so.0.2.3 libdlna.so.0
ln -sf libdlna.so.0 libdlna.so
gmake[2]: выход из каталога «/usr/ports/devel/libdlna/work/libdlna-0.2.3/src»
cc test-libdlna.c -O2 -pipe  -I/usr/local/include -fstack-protector
-fno-strict-aliasing -W -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_REENTRANT -O2 -pipe  -I/usr/local/include -fstack-protector
-fno-strict-aliasing -Isrc -L/usr/local/lib -fstack-protector -Lsrc -ldlna
-lavformat -lavcodec -o test-libdlna
/usr/bin/ld: /usr/local/lib/libdlna.so: invalid string offset 2534 >= 1241 for
section `.dynstr'
/usr/bin/ld: /usr/local/lib/libdlna.so: invalid string offset 2617 >= 1241 for
section `.dynstr'
/usr/bin/ld: /usr/local/lib/libdlna.so: invalid string offset 1461 >= 1241 for
section `.dynstr'
/usr/bin/ld: warning: libavformat.so.1, needed by /usr/local/lib/libdlna.so,
not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libavcodec.so.1, needed by /usr/local/lib/libdlna.so, not
found (try using -rpath or -rpath-link)
/usr/local/lib/libdlna.so: undefined reference to `no symbol'
/usr/local/lib/libdlna.so: undefined reference to
`av_open_input_file at LIBAVFORMAT_52'
/usr/local/lib/libdlna.so: undefined reference to
`av_register_all at LIBAVFORMAT_52'
/usr/local/lib/libdlna.so: undefined reference to
`av_find_stream_info at LIBAVFORMAT_52'
/usr/local/lib/libdlna.so: undefined reference to
`av_close_input_file at LIBAVFORMAT_52'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:36: test-libdlna] Ошибка 1
gmake[1]: выход из каталога «/usr/ports/devel/libdlna/work/libdlna-0.2.3»
*** Error code 1

Note "-L/usr/local/lib -fstack-protector -Lsrc -ldlna" - system library path
get into the flags before local one, so test may not build. Fix this by placing
local library search directory before LDFLAGS.

Also:
- Add license
- Strip library
- Switch to USES=localbase

post-patch target was merged into the Makefile patch to avoid confusion of
having both REINPLACE_CMD and patch for the same file.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list