x11/vlc amd64 build fails after livemedia update

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

x11/vlc amd64 build fails after livemedia update

Stuart Henderson
The livemedia commits break linking for vlc on amd64, -fPIC is needed.
This fixes the build, but I'm not sure how to test whether live555 then
works (and I don't understand when to use -fpic and when -fPIC, and
it's not particularly easy to google for).

Index: files/config.fixed-openbsd
===================================================================
RCS file: /cvs/ports/net/livemedia/files/config.fixed-openbsd,v
retrieving revision 1.1.1.1
diff -u -p -u -r1.1.1.1 config.fixed-openbsd
--- files/config.fixed-openbsd 19 Apr 2007 08:32:23 -0000 1.1.1.1
+++ files/config.fixed-openbsd 19 Apr 2007 12:25:23 -0000
@@ -1,5 +1,5 @@
 .SUFFIXES: .cpp
-COMPILE_OPTS = $(CFLAGS) $(INCLUDES) -I. -DBSD=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1
+COMPILE_OPTS = $(CFLAGS) $(INCLUDES) -I. -DBSD=1 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -fPIC
 C = c
 C_COMPILER = $(CC)
 C_FLAGS = $(COMPILE_OPTS)

Reply | Threaded
Open this post in threaded view
|

Re: x11/vlc amd64 build fails after livemedia update

Antoine Jacoutot
On Thu, 19 Apr 2007, Stuart Henderson wrote:
> The livemedia commits break linking for vlc on amd64, -fPIC is needed.
> This fixes the build, but I'm not sure how to test whether live555 then
> works (and I don't understand when to use -fpic and when -fPIC, and
> it's not particularly easy to google for).

Hmm, weird.
I cannot reproduce this here.

# arch
OpenBSD.amd64

# pkg_info |grep vlc
vlc-0.8.6p4-no_web  videolan client; multimedia player

# pkg_info |grep liveMedia
liveMedia-20070220  LIVE555 streaming media library

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: x11/vlc amd64 build fails after livemedia update

Stuart Henderson
On 2007/04/19 15:02, Antoine Jacoutot wrote:

> On Thu, 19 Apr 2007, Stuart Henderson wrote:
> >The livemedia commits break linking for vlc on amd64, -fPIC is needed.
> >This fixes the build, but I'm not sure how to test whether live555 then
> >works (and I don't understand when to use -fpic and when -fPIC, and
> >it's not particularly easy to google for).
>
> Hmm, weird.
> I cannot reproduce this here.
>
> # arch
> OpenBSD.amd64
>
> # pkg_info |grep vlc
> vlc-0.8.6p4-no_web  videolan client; multimedia player

ah, I am building the normal port version, not no_web. It's failing
when building the plugin.

/usr/bin/ld: /usr/local/live/UsageEnvironment/libUsageEnvironment.a: relocation R_X86_64_32S ca
n not be used when making a shared object; recompile with -fPIC
/usr/local/live/UsageEnvironment/libUsageEnvironment.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
*** Error code 1

Stop in /usr/ports/x11/vlc/w-vlc-0.8.6p4/vlc-0.8.6/mozilla (line 1440 of Makefile).
[...]

the whole log is here:
http://spacehopper.org/openbsd/live-vlc-build.txt.gz

Reply | Threaded
Open this post in threaded view
|

Re: x11/vlc amd64 build fails after livemedia update

Christian Weisgerber
In reply to this post by Stuart Henderson
Stuart Henderson <[hidden email]> wrote:

> The livemedia commits break linking for vlc on amd64, -fPIC is needed.
> This fixes the build, but I'm not sure how to test whether live555 then
> works (and I don't understand when to use -fpic and when -fPIC, and
> it's not particularly easy to google for).

gcc.info has something to say on it, I think.  On some platforms,
-fpic and -fPIC generate different code, using branch instructions
that can only cover shorter (pic) or larger (PIC) distances, creating
size limits for the object files.  If -fpic is insufficient, you'll
get a linking error and have to switch to -fPIC.

Since we have a whole lot of architectures, testing this everywhere
is a lot of effort, and any performance/code size difference doesn't
matter in practice, so we just use -fPIC in the ports tree and don't
worry about it.

--
Christian "naddy" Weisgerber                          [hidden email]