# SELinux build failures...

## breetie

So, I have been attempting to merge SELinux according to the Gentoo SELinux install guide here, but on the step to install 'checkpolicy' and 'policycoreutils' I receive the following error when emerge attempts to compile sys-libs/libselinux-9999:

```
/usr/lib/gcc/ia64-unknown-linux-gnu/4.9.4/../../../../ia64-unknown-linux-gnu/bin/ld: cannot find -lselinux

/usr/lib/gcc/ia64-unknown-linux-gnu/4.9.4/../../../../ia64-unknown-linux-gnu/bin/ld: cannot find -lselinux

collect2: error: ld returned 1 exit status

make[1]: *** [<builtin>: compute_user] Error 1
```

It would appear this is another chicken-and-egg error, where it is looking for the selinux.so library before it is built? Anyone have some suggestions on how to approach this?

----------

## Maitreya

sys-libs/libselinux-9999

...

-9999

...

9999

...

9999

----------

## breetie

 *Maitreya wrote:*   

> sys-libs/libselinux-9999
> 
> ...
> 
> -9999
> ...

 

Pretend I don't know anything and have no idea what you're referencing here...what are you saying?

----------

## Maitreya

Ah sorry,

The versioning implies that you unmasked both sys-libs/libselinux and sys-libs/libsepol with the ** keyword. This "9999" is usually an indication you are dealing with bleeding edge code instead of the stable recommended code.

If one would like to divert from stable you'd divert first by using the ~* keyword as that would unmask the testing branch.

But as https://packages.gentoo.org/packages/sys-libs/libselinux shows.

There is no version available it seems for ia64.

Which leads me to the next question, which processor do you have?

----------

## breetie

 *Maitreya wrote:*   

> Ah sorry,
> 
> The versioning implies that you unmasked both sys-libs/libselinux and sys-libs/libsepol with the ** keyword. This "9999" is usually an indication you are dealing with bleeding edge code instead of the stable recommended code.

 

That is correct. I went with the recommendation provided by Portage, which apparently is wrong.

 *Quote:*   

> If one would like to divert from stable you'd divert first by using the ~* keyword as that would unmask the testing branch.
> 
> But as https://packages.gentoo.org/packages/sys-libs/libselinux shows.
> 
> There is no version available it seems for ia64.

 

Right. I guess I was hoping that "A" version would compile. Alas, it appears that is an empty hope.

 *Quote:*   

> Which leads me to the next question, which processor do you have?

 

Itanium 2 (HP rx6600)

Incidentally, when switching to the hardened profile for my architecture and upgrading or changing a package, Portage claims hardened is not supported for my architecture, hopes I know what I'm doing and says it probably won't work. My guess is, effort has been made to ensure this architecture won't come back from the dead.

----------

## Maitreya

Then keep the ** keywords but mask the version to a stable one.

Maybe it works on your arch because it's hard to tell if the error is because of the bleeding edge or arch (probably arch but i hope a bug for you)

----------

