Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerge apache fails on pcre-config script [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ivion
n00b
n00b


Joined: 23 Jan 2003
Posts: 45
Location: Amsterdam

PostPosted: Mon Feb 10, 2014 3:33 am    Post subject: Emerge apache fails on pcre-config script [SOLVED] Reply with quote

I've recently reinstalled Gentoo on my homeserver and while in the business of installing and configuring everything again I came across an apache unwilling to compile:
Code:
checking for APR-util... yes
  adding "-L/usr/lib64" to LDFLAGS
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
configure: error: Did not find pcre-config script at /compile/portage/www-servers/apache-2.2.25/temp/pcre-config

But when I go to `/compile/portage/www-servers/apache-2.2.25/temp/` the `pcre-config` file is there, containing:
Code:
#!/bin/sh
[ "${flag}" = "--version" ] && set -- --modversion
exec ${PKG_CONFIG} libpcre "$@"

So I'm not sure what it exactly is that the configure step is failing on... any help would be appreciated. (The full build.log is located here.)
_________________
This post was created by millions of tiny cows jumping around on my keyboard.


Last edited by Ivion on Wed Feb 12, 2014 4:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8602

PostPosted: Mon Feb 10, 2014 4:26 am    Post subject: Reply with quote

http://pastebin.com/5tGMbxZ0:
!!! Please attach the following file when seeking support:
!!! /compile/portage/www-servers/apache-2.2.25/work/httpd-2.2.25/config.log
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1355

PostPosted: Mon Feb 10, 2014 7:32 am    Post subject: Reply with quote

Can you file this bug at Gentoo Bugzilla? Read here how to write a bug report, for more in-depth details and troubleshooting steps you can read our Bugzilla HOWTO.
Back to top
View user's profile Send private message
Ivion
n00b
n00b


Joined: 23 Jan 2003
Posts: 45
Location: Amsterdam

PostPosted: Mon Feb 10, 2014 8:10 pm    Post subject: Reply with quote

TomWij wrote:
Can you file this bug at Gentoo Bugzilla? Read here how to write a bug report, for more in-depth details and troubleshooting steps you can read our Bugzilla HOWTO.

Alright, I've done so: Bug #500928. So I guess this will be continued there...
_________________
This post was created by millions of tiny cows jumping around on my keyboard.
Back to top
View user's profile Send private message
Ivion
n00b
n00b


Joined: 23 Jan 2003
Posts: 45
Location: Amsterdam

PostPosted: Wed Feb 12, 2014 4:03 pm    Post subject: Reply with quote

Thanks to SpanKY I can say this problem has been resolved. It was the Trusted Path Execution settings in my hardened kernel, specifically the CONFIG_GRKERNSEC_TPE_ALL option. This option restricts all non-root users so that they cannot execute files in directories that are world or group writable (amongst other things), and it happens to be the case that the build part of emerge drops its root privileges and works in directories that are group writable (portage group). So when the build process requires a file to be executed from there it gets denied, as conform the settings. If I'd known that emerge drops down to the user portage when actually building I might've figured it out sooner, but at least now I know. :)
Also I should've looked more carefully at my log files, because as SpanKY says in the bug report, the cause for the build-failure was plainly to be found in `dmesg`:
Code:
grsec: From x.x.x.x: denied untrusted exec (due to file in group-writable directory) of /compile/portage/www-servers/apache-2.2.25/temp/pcre-config by /compile/portage/www-servers/apache-2.2.25/temp/pcre-config[configure:5389] uid/euid:250/250 gid/egid:250/250, parent /compile/portage/www-servers/apache-2.2.25/work/httpd-2.2.25/configure[configure:4220] uid/euid:250/250 gid/egid:250/25

_________________
This post was created by millions of tiny cows jumping around on my keyboard.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum