Compiling ports and linking libraries: TrueOS differences?


#1

I’m asking this because I’m trying to use or compile a port in Trident/TrueOS, and I don’t know how it works in standard FreeBSD.

https://www.freshports.org/audio/bristol/

It reports having Jack support and a GUI, but in fact it has not. At least, I’m talking about the package built by Trident.

Trying to compile it myself, it reports finding Jack in /usr/local/lib, but then, it does not find jack and X11 headers (presence... no). But I can see they’re actually there in /usr/local/include.

Hacking the scripts, I can see that there’s a variable that points to that folder.

As a matter of curiosity, I created symbolic links to those header folders in /usr/include, and then the compiler reports having found those headers (presence... yes!). But the compilation fails, reporting: ld: error: unable to find library -lX11. And so I give up.

Here’s my question: is there perhaps a specific tweak needed for Trident to build ports finding headers and libraries which can be found in /usr/local/include? Or should this issue be reported straight to the port maintainer?

Before someone asks: I’m trying to build in trueos-master.

Thanks, anybody.


#2
Try this...
# cd /usr/ports
# git pull 
# cd audio/bristol
# env LDFLAGS="-L/usr/local/lib -R/usr/local/lib" CPPFLAGS=-I/usr/local/include make clean package
# pkg install work/pkg

John
groenveld@acm.org

#3

Awesome! The build went much further now! But still… it stopped with:

ld: error: undefined symbol: bristolJackSessionCheck
>>> referenced by bristol.c:887
>>>               bristol.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

Just before that last command, we can see this:

/bin/sh: pkg-config: not found
/bin/sh: pkg-config: not found

Well… is pkg-config missing? Is there something I can do about it?

Thank you, very much.


#4

[quote=“Sergio, post:3, topic:3664, full:true”]
Awesome! The build went much further now! But still… it stopped with:

ld: error: undefined symbol: bristolJackSessionCheck
>>> referenced by bristol.c:887
>>>               bristol.o:(main)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

Just before that last command, we can see this:

/bin/sh: pkg-config: not found
/bin/sh: pkg-config: not found

Well… is pkg-config missing? Is there something I can do about it?

# pkg which `which pkg-config`
/usr/local/bin/pkg-config was installed by package pkgconf-1.5.4,1

John
groenveld@acm.org

#5

Thank you. It’s installed now. But on running it reports:

ld-elf.so.1: Shared object "libB11.so.0" not found, required by "brighton"

I think it’s time to report this things upstream, somewhere. Does anybody know whom should it be reported? To TrueOS devs? To the port maintainer?


#6

i’d start with trueos first.


#7
--- a/audio/bristol/pkg-plist
+++ b/audio/bristol/pkg-plist
@@ -26,6 +26,10 @@ lib/libbrighton.so.0.0.610
 lib/libbrighton.so.0
 lib/libbrighton.so
 lib/libbrighton.a
+lib/libB11.so.0.0.610
+lib/libB11.so.0
+lib/libB11.so
+lib/libB11.a
 lib/libC11.so.0.0.610
 lib/libC11.so.0
 lib/libC11.so

I'm a FreeBSD newbie, not sure how best to add the LD_FLAGS and CPPFLAGS 
to the Makefile to pass to the configure script.

John
groenveld@acm.org

#8

Awesome! Now I’ve got Bristol working with a GUI and Jack support.

I’m going to report this to the TrueOS devs. I hope they will do what’s best to fix this build.

Thank you, very much.