# polkit -- fails to build



## eyebone (Jan 2, 2011)

Hi folks,

In the moment I reinstall all my ports and stumbled about several problems. One of them I could not solve so far. Going to FILE]sysutils/polkit[/FILE] trying to build results in:


```
./polkitunixsession.h                   \
                ./polkitunixuser.h                      \

/usr/include/machine/endian.h:123: syntax error, unexpected '{' in ' return (__extension__ ({ register __uint64_t __X = (_x); __asm ("bswap %0" : 
"+r" (__X)); __X; }));' at '{'
/usr/include/machine/endian.h:123: syntax error, unexpected ';' in ' return (__extension__ ({ register __uint64_t __X = (_x); __asm ("bswap %0" : 
"+r" (__X)); __X; }));' at ';'
/usr/include/machine/endian.h:130: syntax error, unexpected '{' in ' return (__extension__ ({ register __uint32_t __X = (_x); __asm ("bswap %0" : 
"+r" (__X)); __X; }));' at '{'
/usr/include/machine/endian.h:130: syntax error, unexpected ';' in ' return (__extension__ ({ register __uint32_t __X = (_x); __asm ("bswap %0" : 
"+r" (__X)); __X; }));' at ';'
Namespace conflict for 'implicit_authorization_get_type'
gmake[4]: *** [Polkit-1.0.gir] Error 1
gmake[4]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.96/src/polkit'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.96/src/polkit'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.96/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.96'
gmake: *** [all] Error 2
```

I tried to install policykit first and then polkit, Update of the portstree is 1h ago. System is 8.2-PRE on amd64.

Someone has a hint what is going on?


----------



## rtwingfield (Jan 26, 2011)

*g-ir-scanner Command Not Found*

I can't offer any suggestions for your immediate problem, but I've run into the following while trying to install GNOME2.  I've deinstalled polkit and tried to remake it with the following complaint that the g-ir-scanner command cannot be found.  In fact, /usr/local/bin/g-ir-scanner exists and it's mode is 555.

This is the output of the make build process:

```
gmake[4]: /usr/local/bin/g-ir-scanner: Command not found
gmake[4]: *** [Polkit-1.0.gir] Error 127
gmake[4]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.99/src/polkit'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.99/src/polkit'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.99/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/sysutils/polkit/work/polkit-0.99'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/sysutils/polkit.
```

The "command" is a Python script noted as follows:

```
#!/usr/local/bin/python2.5
# -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
```


Interestingly, there are two similar g-ir-* executables, g-ir-compiler and g-ir-generate, and both are stripped binaries.  Should g-ir-scanner also be a binary?  . . .probably not, but if so, then what went wrong, when, where and with what?


```
68 -r-xr-xr-x  1 root  wheel  68804 Jan 25 09:49 g-ir-compiler
 28 -r-xr-xr-x  1 root  wheel  28092 Jan 25 09:49 g-ir-generate
  2 -r-xr-xr-x  1 root  wheel   1385 Jan 25 09:49 g-ir-scanner
```

FYI, I'm running on FreeBSD 7.2-RELEASE.  I've also installed portupgrade and ran against _all_.  I've also run [cmd=]portupgrade gnome2[/cmd]


----------



## SirDice (Jan 26, 2011)

My guess is that /usr/local/bin/python2.5 doesn't exist. 


```
dice@williscorto:~/test>cat t.sh 
#!/usr/bin/doesnotexist

echo "This doesn't work"

dice@williscorto:~/test>chmod +x t.sh 
dice@williscorto:~/test>./t.sh 
./t.sh: Command not found.
```

Confusing error message but that's how it works :e
The error is in the shebang line. It's that command that's missing.


----------



## rtwingfield (Jan 26, 2011)

Good call!  Thanks for helping me see the forrest through the trees.

Actually, I've found the following versions of Python installed, but why both (and not v2.5) . . .I don't know.

```
python26-2.6.5_1    An interpreted object-oriented programming language
python31-3.1.2_1    An interpreted object-oriented programming language
```

I edited the g-ir-scanner script to specify #!/usr/local/bin/python2.*6* and the port _made_ to completion.  I have to question why this port is out of sync in consideration that I upgraded all ports, etc.

OTTF . . .now back to GNOME2


----------

