# consolekit 0.4.1_1 ports build failure, workaround or i386 binary package available?



## mickrussom (Dec 2, 2009)

consolekit 0.4.1_1 ports build failure, workaround or i386 binary package available?


```
GEN GLib-2.0.gir
/usr/include/machine/endian.h:107: syntax error, unexpected '{'
/usr/include/machine/endian.h:107: syntax error, unexpected ';'
Command 
'['/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.5/gir/tmp-introspectMS1zp2/GLib-2.0', '--introspect-dump=/usr/ports
/devel/gobject-introspection/work/gobject-introspection-0.6.5/gir/tmp-introspectMS1zp2/types.txt,/usr/ports/devel/gobject-introspection
/work/gobject-introspection-0.6.5/gir/tmp-introspectMS1zp2/dump.xml']' 
returned non-zero exit status -15
gmake[2]: *** [GLib-2.0.gir] Error 1
gmake[2]: Leaving directory 
`/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.5/gir'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory 
`/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.6.5'
gmake: *** [all] Error 2
*** Error code 1
Stop in /usr/ports/devel/gobject-introspection.
*** Error code 1
Stop in /usr/ports/sysutils/polkit.
*** Error code 1
Stop in /usr/ports/sysutils/consolekit.
```

consolekit refuses to build, it sits at:


```
GEN GLib-2.0.gir
```
(FOREVER)


I waited for 6 hours for completion, never happened. 
process seems to hang:

```
34827 root 1 76 0 21112K 4416K umtxn 0:00 0.00% GLib-2.0
# procstat -k 34827
 PID TID COMM TDNAME KSTACK 
 34827 100148 GLib-2.0 initial thread mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex do_lock_umutex 
__umtx_op_wait_umutex _umtx_op syscall Xint0x80_syscall
```


Nothing I've been able to try gets this package to compile. All other port builds (about 380 packages) work fine. (Rebuild ALL with portupgrade -af), only this *one* fails.

Any help here would be great, but I'm more than happy to use a binary package (i386) to move past this. It seems like a rather uninteresting dependency which I really could care anything about.

References:
http://www.freshports.org/sysutils/consolekit/

http://pointyhat.freebsd.org/errorlogs/i386-8-latest-logs/consolekit-0.3.0_8.log

(Note: isnt it odd to allow ports to be checked in without first building them here to see if they work?, not that 0.4.1_1 is not there as of 12/2/2009)

0.4.1_1 claims success on tinderbox:
http://tinderbox.sigabrt.org/index.php?action=describe_port&id=166

but the package offered there is only x86_64.


----------



## mickrussom (Dec 2, 2009)

*Its really gobject-introspection-0.6.5 that isnt building.*

I tried both the ports version of gobject-introspection-0.6.5 and the latest from the git-repo. 

Neither will compile.

The process seems to get hung here:



```
env LPATH=.libs env PYTHONPATH=..:..:$PYTHONPATH UNINSTALLED_INTROSPECTION_SRCDIR=.. UNINSTALLED_INTROSPECTION_BUILDDIR=.. ../tools/g-ir-
scanner -v --add-include-path=../gir --add-include-path=. --namespace GLib --nsversion=2.0 --noclosure --output GLib-2.0.gir --strip-prefix=g 
--libtool="/bin/sh /usr/local/bin/libtool" --c-include="glib.h" --library=glib-2.0 --pkg glib-2.0 -I/usr/local/include -I`pkg-config 
--variable=includedir glib-2.0`/glib-2.0 -DGETTEXT_PACKAGE=Dummy -D__G_I18N_LIB_H__ `pkg-config --variable=includedir glib-2.0`/glib-
2.0/glibconfig.h ./glib-2.0.c -DGLIB_COMPILATION `pkg-config --variable=includedir glib-2.0`/glib-2.0/glib/*.h
```

What this does is makes a file in some temp directory called glib-2.0c. This file gets compiled into GLib-2.0.o, this seems to then run and this seems to hang at this point. The types.txt file in the directory with GLib-2.0 / GLib-2.0.o is empty, and nothing happens.

All packages that glib2, consolekit and gnome-introspection where rebuilt on this system to eliminate problems. All the other ports were rebuilt insitu on this unit as well.
I can't figure out what is causing this GLib-2.0 process to basically do nothing.


----------



## SirDice (Dec 2, 2009)

It builds fine. Make sure all it's dependencies are also up to date.


----------



## mickrussom (Dec 2, 2009)

You mind just giving me the package file for ConsoleKit 0.4.1_1 for i386 or pointing to a place where I can get it. I rebuilt all the packages on the system already and this is the one, single port that wont built I've run into issues from time to time when dealing with gnome's mess, and I really just want to get the consolekit updated to 0.4.1_1.

If its easy to build for i386, then the pacakge file should be available somewhere, right?


----------



## SirDice (Dec 2, 2009)

Do you have any compiler options in /etc/make.conf?


----------



## mickrussom (Dec 3, 2009)

SirDice said:
			
		

> Do you have any compiler options in /etc/make.conf?



This is it:


```
# cat /etc/make.conf | grep -v ^#
BATCH=yes
PERL_VERSION=5.8.9
```


----------



## Rick (Dec 5, 2009)

Having the same problem on 7.1-RELEASE-p2, the it appears to be hanging on the g_file_new_for_path function calls in girepository/gdump.c function g_irepository_dump.

Tried rebuilding various ports (glib20, libiff, etc) with no result.


```
PID    TID COMM             TDNAME           KSTACK                       
22754 100154 GLib-2.0         initial thread   mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _sleep _do_lock_umutex 
do_lock_umutex __umtx_op_lock_umutex _umtx_op syscall Xint0x80_syscall
```

My make.conf:
	
	



```
CPUTYPE=nocona
PERL_VERSION=5.8.9
```

Don't think glib2/gio is broken, wrote a quick test that uses g_file_new_for_path with no issues.


----------



## mickrussom (Dec 31, 2009)

*gobject-introspection still not building.*

gobject-introspection is still not building. The consolekit ports was bumped 0.4.1_2 and gobject-introspection still doesnt build.

400 ports. Only gobject-introspection isnt building. World doesnt seem to care. Others have same problem.


----------



## mickrussom (Jan 1, 2010)

After installing:

ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/gobject-introspection-0.6.7.tbz

ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/polkit-0.95_3.tbz

Consolekit built and installed.

polkit had to be installed due to some syntax error indicated by an unexpected "{" in 107 of endian.h.

Cursory searches on google (try [freebsd "endian.h" "syntax error" unexpected]) reveal a number of complaints regarding endian.h  

I've been churning ports for some time, and this seems like the gnome stuff is quite a mess due to generated code failures and failures which are "hangs" rather than having useful output.


----------



## Grey_Ash (Apr 27, 2010)

And gobject-introspection is still not building, at least for me today.


----------



## Rick (Apr 27, 2010)

Yeah, I ended up using binary packages to get around the issue.


----------



## mickrussom (May 13, 2010)

*[INFO] gobject-introspection-0.6.5: gmake[2]: ***  Segmentation fault: 11 (core dumpe*


```
[INFO] gobject-introspection-0.6.5: gmake[2]: ***  Segmentation fault: 11 (core dumped)
```

and


```
/usr/include/machine/endian.h:107: syntax error, unexpected '{' in '   return (__extension__ ({ register __uint32_t __X = (_x); __asm 
("bswap   %0" : "+r" (__X)); __X; }));' at '{'
```
and

hanging "glib-2.0", hanging g-ir-scanner, etc.


Removing GAMIN allows gobject-introspection to build.

This problem has been bothering me for some time.

Lots of people cant build gobject-introspection its easy to see on google.

Anyway, gamin is causing this and things like g-ir-scanner to fail on a number of systems and removing gamin allowed things to start working again.


reference below.

[]http://groups.google.com/group/mail...ad/7a82aab09d3c66ba/0216cfcffb65b81a?lnk=raot



> ```
> Newsgroups: mailing.freebsd.ports
> From: g...@lynge.org (Gert Lynge)
> Date: Tue, 27 Apr 2010 16:29:37 +0200
> ...


----------



## Rick (May 13, 2010)

Props to you for figuring out the issue, I can confirm that removing gamin on my system allows for gobject-introspection to build properly.


----------



## Grey_Ash (May 13, 2010)

great news. Thanks.


----------



## Giraya (May 20, 2010)

I had the same error here.
The python port installed on my system is 2.5.
I've done `# portupgrade -o lang/python26 lang/python25` (with THREADS option selected) and now it compiles without segfault.


----------



## mickrussom (Aug 16, 2010)

*gamin / fam problems back again.*

FreeBSD 8.1 and the problem comes back again. 

Seems another person thinks this issue has to do with the following:

From:	Andrew Bliznak 
Date:	Tue, 13 Jul 2010 11:20:13 +0300
just hit this bug

Problem appears to be lost link /usr/lib/libpthread.so -> libthr.so
This produces broken libgthread-2.0.so, it misses libthr.so.3 =>
/lib/libthr.so.3 and uses stubs from libc.so


----------

