You are not logged in.

#1 2012-06-20 15:28:08

W.F.Cody
Member
From: Ghent
Registered: 2010-11-18
Posts: 155

compiling applications via plan9port - p9p, libc or ld bug?

Hi

I recently tried to build the web browser abaco and hit the following problem:

9l -o o.abaco cols.o exec.o html.o main.o page.o rows.o scrl.o tabs.o text.o time.o urls.o util.o wind.o 
(.text+0x23): undefined reference to `pthread_detach'
(.text+0x91): undefined reference to `pthread_mutex_trylock'
(.text+0xd5): undefined reference to `pthread_mutexattr_init'
(.text+0xe0): undefined reference to `pthread_mutexattr_settype'
(.text+0xf5): undefined reference to `pthread_mutexattr_destroy'
(.text+0x22e): undefined reference to `pthread_create'
(.text+0x27c): undefined reference to `pthread_getspecific'
(.text+0x28f): undefined reference to `pthread_setspecific'
(.text+0x2db): undefined reference to `pthread_key_create'
(.text+0x2fd): undefined reference to `pthread_key_create'
collect2: fel: ld returnerade avslutningsstatus 1
mk: 9l -o o.abaco ...  : exit status=exit(1)
mk: for (i in ...  : exit status=exit(1)

Last time I built this one was ~6 months ago on a different machine and then it worked nicely.
The AUR (https://aur.archlinux.org/packages.php?ID=28589) has not changed since then, so the only logical culprits would be
plan9port (http://www.archlinux.org/packages/commu … plan9port/): updated 20120305,
glibc (http://www.archlinux.org/packages/testing/x86_64/glibc/): updated 20120616
ld (http://www.archlinux.org/packages/core/x86_64/binutils/): updated 20120502

is there a way to figure this out and fix it?


My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!

Offline

#2 2012-06-20 16:26:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,818
Website

Re: compiling applications via plan9port - p9p, libc or ld bug?

I tried to take a look, but I don't know enough about plan9 and I don't have the plan9port installed to experiment more.

I'm pretty sure nothing relevant has changed in glibc or the pthread library.  If this were a 'normal' make process I'd say it was missing the -lpthread on the linker line, but I can find no library flags in the mkfiles ... so I'm not sure how the 9p mk does it's linking.

If I had these tools installed I'd try to walk through the steps in the PKGBUILD manually to see if you can get it to compile in the local directory.  If so, makepkg could take it from there.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-06-21 14:03:29

W.F.Cody
Member
From: Ghent
Registered: 2010-11-18
Posts: 155

Re: compiling applications via plan9port - p9p, libc or ld bug?

I found the bug:

It is actually an error in the 9l script (/opt/plan9/bin/9l), where uname tests for Linux 2.6.x :

...
*Linux*)
	ld=${CC9:-gcc}
	userpath=true
	extralibs="$extralibs -lutil"
	case "${SYSVERSION:-`uname -r`}" in
	2.6.*)
		extralibs="$extralibs -lpthread"
		;;
	esac
	;;
...

here another case for 3.* should be added with the same contents...


My AUR packages
Any package of mine is up for grabs. If you think you could mantain it better - just contact me!

Offline

Board footer

Powered by FluxBB