Trouble of building vlc

I was going to try building vlc to enable upnp, but it faild :frowning:
How can I fix it?

 /sources/vlc-3.0.21/modules/gui/qt/pixmaps/faster2.svg -> faster.svg
  /sources/vlc-3.0.21/modules/gui/qt/pixmaps/slower2.svg -> slower.svg
extras/package/npapi.am:34: warning: ':='-style assignments are not portable
Makefile.am:219:   'extras/package/win32/package.mak' included from here
extras/package/win32/package.mak:14:   'extras/package/npapi.am' included from here
runConfigure: Must specify optimization flags when overriding CFLAGS/CXXFLAGS.
        (autotools configure will not use the default ones in that case.)
Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 1.
cleaning 'chroot/boot' folder
keeping chroot folder /boot/home/Ports/haikuports/media-video/vlc/work-3.0.21 intact for inspection
Error: Build has failed - stopping.

I have no idea… :slight_smile:
Maybe the haikuports recipe can shed some light on the needed dependencies and build acrobatics.

2 Likes

Maybe upnp is available only for win32 as it shows a path "```
extras/package/win32/package.mak

1 Like

Looking at the version in your log the version is already available for install as @humdinger mentioned (pointed to the recipe), if you still want to build it localy check the patchset for it, that should help too.

2 Likes

I wonder why win32’s stuff is related to building vlc for “haiku”…

That part explains where the issue is. The recipe currently does:

	export CFLAGS="-lgnu -lnetwork"
	export CXXFLAGS="-lgnu -lnetwork"

The error message asks to add -O2, for example, to those.

This is due to this change (and its follow up) in HaikuPorter (the current vlc package was built before those got merged).

1 Like

@BiPolar
Thanx! Build has done successfully…but libupnp was not linked into vlc :frowning:
I need more research.

The recipe already has devel:libupnp as a build requirement (BUILD_REQUIRES), and lib:libupnp as a runtime requirement (REQUIRES)…do you get any message related to UPNP during build? Perhaps the version of libupnp in HaikuPorts is just too old, and thus is not usable by VLC?

Edit: @Begasus did some quick checks (thanks!), and seems libupnp IS linked to at least one of the VLC plugins.

So it might be that it is properly linked/loaded, but it either doesn’t works well enough in Haiku, or some setup is needed to make it work like you expect?

1 Like

Looks like our version’s binary isn’t linked to it also:

~> readelf -d /system/bin/vlc 

Dynamic section at offset 0x2020 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libvlc.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libvlccore.so.9]
 0x0000000000000001 (NEEDED)             Shared library: [libbe.so]
 0x0000000000000001 (NEEDED)             Shared library: [libintl.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libiconv.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libgnu.so]
 0x0000000000000001 (NEEDED)             Shared library: [libnetwork.so]
 0x0000000000000001 (NEEDED)             Shared library: [libroot.so]
1 Like

Thanks to @BiPolar again and a new function in profile I found this: :slight_smile:

[ /boot/system/lib/vlc/plugins/services_discovery/libupnp_plugin.so ]
 0x0000000000000001 (NEEDED)             Shared library: [libgnu.so]
 0x0000000000000001 (NEEDED)             Shared library: [libnetwork.so]
 0x0000000000000001 (NEEDED)             Shared library: [libvlccore.so.9]
 0x0000000000000001 (NEEDED)             Shared library: [libupnp.so.17]
 0x0000000000000001 (NEEDED)             Shared library: [libixml.so.11]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libroot.so]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
1 Like