Mailing List Archive

mysql problems
Hello,
I'm having problems with mysql:

resolveip: error while loading shared libraries: cannot make segment
writable for relocation: Permission denied

ldd `which resolveip`
libstdc++.so.5 =>
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x23d21000)
libgcc_s.so.1 =>
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x23e6e000)
libc.so.6 => /lib/libc.so.6 (0x23e81000)
libpthread.so.0 => /lib/libpthread.so.0 (0x23f99000)
libz.so.1 => /lib/libz.so.1 (0x23fab000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x23fbf000)
libnsl.so.1 => /lib/libnsl.so.1 (0x23fed000)
libm.so.6 => /lib/libm.so.6 (0x24003000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x23d0a000)

I'm trying to recompile mysql, but:

make[5]: Entering directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20/sql'
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\""
-DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\""
-DHAVE_CONFIG_H -I. -I. -I.. -I../innobase/include -I./../include
-I./../regex -I. -I../include -I. -O3 -DDBUG_OFF -march=pentium2 -O3
-pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4
-ftracer -fstack-protector-all -felide-constructors -fno-exceptions
-fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -c
-I../innobase/include -I./../include -I./../regex -I. -I../include -I.
gen_lex_hash.cc
/bin/sh ../libtool --preserve-dup-deps --mode=link g++ -O3 -DDBUG_OFF
-march=pentium2 -O3 -pipe -fomit-frame-pointer -ffast-math -fforce-addr
-falign-functions=4 -ftracer -fstack-protector-all -felide-constructors
-fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions
-fno-rtti -rdynamic -o gen_lex_hash gen_lex_hash.o ../isam/libnisam.a
../merge/libmerge.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a
../heap/libheap.a ../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a
../regex/libregex.a ../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl
-lm -lpthread
mkdir .libs
g++ -O3 -DDBUG_OFF -march=pentium2 -O3 -pipe -fomit-frame-pointer
-ffast-math -fforce-addr -falign-functions=4 -ftracer
-fstack-protector-all -felide-constructors -fno-exceptions -fno-rtti
-fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o
gen_lex_hash gen_lex_hash.o ../isam/libnisam.a ../merge/libmerge.a
../myisam/libmyisam.a ../myisammrg/libmyisammrg.a ../heap/libheap.a
../vio/libvio.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a
../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl -lm -lpthread
make[5]: Leaving directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20/sql'
./gen_lex_hash > lex_hash.h
./gen_lex_hash: error while loading shared libraries: cannot make segment
writable for relocation: Permission denied
make[4]: *** [lex_hash.h] Error 127
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/mysql-4.0.20-r1/work/mysql-4.0.20'
make: *** [all] Error 2

!!! ERROR: dev-db/mysql-4.0.20-r1 failed.
!!! Function src_compile, Line 163, Exitcode 2
!!! compile problem


What can I do?

--
gentoo-hardened@gentoo.org mailing list
Re: mysql problems [ In reply to ]
I assume your using PaX in your kernel.

You probably enabled NOELFRELOCS in the kernel .config without
reading the config help.

On Sat, 2004-09-11 at 21:18, Andrei Ivanov wrote:
> Hello,
> I'm having problems with mysql:
>
> resolveip: error while loading shared libraries: cannot make segment
> writable for relocation: Permission denied
>
> ldd `which resolveip`
> libstdc++.so.5 =>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x23d21000)
> libgcc_s.so.1 =>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x23e6e000)
> libc.so.6 => /lib/libc.so.6 (0x23e81000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x23f99000)
> libz.so.1 => /lib/libz.so.1 (0x23fab000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x23fbf000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x23fed000)
> libm.so.6 => /lib/libm.so.6 (0x24003000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x23d0a000)
>

> ./gen_lex_hash > lex_hash.h
> ./gen_lex_hash: error while loading shared libraries: cannot make segment
> writable for relocation: Permission denied

[snip crap]

> What can I do?

If the above is the case then disable the option or chpax/paxctl -m said program.


> --
> gentoo-hardened@gentoo.org mailing list
--
Ned Ludd <solar@gentoo.org>
Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer
Re: mysql problems [ In reply to ]
I'm sorry but I did read the help, but as I've compiled the whole system with
the pic and pie flags enabled I thought I wouldn't have any problems.

chpax -pEmrxsv /usr/bin/resolveip

----[ chpax 0.7 : Current flags for /usr/bin/resolveip (pEmrxs) ]----

* Paging based PAGE_EXEC : disabled
* Trampolines : emulated
* mprotect() : not restricted
* mmap() base : not randomized
* ET_EXEC base : not randomized
* Segmentation based PAGE_EXEC : disabled

resolveip
resolveip: error while loading shared libraries: cannot make segment writable
for relocation: Permission denied

So nothing's changed.

The same for gen_lex_hash.

ldd gen_lex_hash
libpthread.so.0 => /lib/libpthread.so.0 (0x20607000)
libz.so.1 => /lib/libz.so.1 (0x20619000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x2062e000)
libnsl.so.1 => /lib/libnsl.so.1 (0x2065c000)
libstdc++.so.5 =>
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x20672000)
libm.so.6 => /lib/libm.so.6 (0x207bf000)
libgcc_s.so.1 =>
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x207e2000)
libc.so.6 => /lib/libc.so.6 (0x207ee000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x205ea000)


On Sat, 11 Sep 2004, Ned Ludd wrote:

> I assume your using PaX in your kernel.
>
> You probably enabled NOELFRELOCS in the kernel .config without
> reading the config help.
>
> On Sat, 2004-09-11 at 21:18, Andrei Ivanov wrote:
>> Hello,
>> I'm having problems with mysql:
>>
>> resolveip: error while loading shared libraries: cannot make segment
>> writable for relocation: Permission denied
>>
>> ldd `which resolveip`
>> libstdc++.so.5 =>
>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x23d21000)
>> libgcc_s.so.1 =>
>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x23e6e000)
>> libc.so.6 => /lib/libc.so.6 (0x23e81000)
>> libpthread.so.0 => /lib/libpthread.so.0 (0x23f99000)
>> libz.so.1 => /lib/libz.so.1 (0x23fab000)
>> libcrypt.so.1 => /lib/libcrypt.so.1 (0x23fbf000)
>> libnsl.so.1 => /lib/libnsl.so.1 (0x23fed000)
>> libm.so.6 => /lib/libm.so.6 (0x24003000)
>> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x23d0a000)
>>
>
>> ./gen_lex_hash > lex_hash.h
>> ./gen_lex_hash: error while loading shared libraries: cannot make segment
>> writable for relocation: Permission denied
>
> [snip crap]
>
>> What can I do?
>
> If the above is the case then disable the option or chpax/paxctl -m said
> program.
>
>
>> --
>> gentoo-hardened@gentoo.org mailing list
> --
> Ned Ludd <solar@gentoo.org>
> Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer
>


--
gentoo-hardened@gentoo.org mailing list
Re: mysql problems [ In reply to ]
file a bug.

On Sat, 2004-09-11 at 23:48, Andrei Ivanov wrote:
> I'm sorry but I did read the help, but as I've compiled the whole system with
> the pic and pie flags enabled I thought I wouldn't have any problems.
>
> chpax -pEmrxsv /usr/bin/resolveip
>
> ----[ chpax 0.7 : Current flags for /usr/bin/resolveip (pEmrxs) ]----
>
> * Paging based PAGE_EXEC : disabled
> * Trampolines : emulated
> * mprotect() : not restricted
> * mmap() base : not randomized
> * ET_EXEC base : not randomized
> * Segmentation based PAGE_EXEC : disabled
>
> resolveip
> resolveip: error while loading shared libraries: cannot make segment writable
> for relocation: Permission denied
>
> So nothing's changed.
>
> The same for gen_lex_hash.
>
> ldd gen_lex_hash
> libpthread.so.0 => /lib/libpthread.so.0 (0x20607000)
> libz.so.1 => /lib/libz.so.1 (0x20619000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x2062e000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x2065c000)
> libstdc++.so.5 =>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x20672000)
> libm.so.6 => /lib/libm.so.6 (0x207bf000)
> libgcc_s.so.1 =>
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x207e2000)
> libc.so.6 => /lib/libc.so.6 (0x207ee000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x205ea000)
>
>
> On Sat, 11 Sep 2004, Ned Ludd wrote:
>
> > I assume your using PaX in your kernel.
> >
> > You probably enabled NOELFRELOCS in the kernel .config without
> > reading the config help.
> >
> > On Sat, 2004-09-11 at 21:18, Andrei Ivanov wrote:
> >> Hello,
> >> I'm having problems with mysql:
> >>
> >> resolveip: error while loading shared libraries: cannot make segment
> >> writable for relocation: Permission denied
> >>
> >> ldd `which resolveip`
> >> libstdc++.so.5 =>
> >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.so.5 (0x23d21000)
> >> libgcc_s.so.1 =>
> >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 (0x23e6e000)
> >> libc.so.6 => /lib/libc.so.6 (0x23e81000)
> >> libpthread.so.0 => /lib/libpthread.so.0 (0x23f99000)
> >> libz.so.1 => /lib/libz.so.1 (0x23fab000)
> >> libcrypt.so.1 => /lib/libcrypt.so.1 (0x23fbf000)
> >> libnsl.so.1 => /lib/libnsl.so.1 (0x23fed000)
> >> libm.so.6 => /lib/libm.so.6 (0x24003000)
> >> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x23d0a000)
> >>
> >
> >> ./gen_lex_hash > lex_hash.h
> >> ./gen_lex_hash: error while loading shared libraries: cannot make segment
> >> writable for relocation: Permission denied
> >
> > [snip crap]
> >
> >> What can I do?
> >
> > If the above is the case then disable the option or chpax/paxctl -m said
> > program.
> >
> >
> >> --
> >> gentoo-hardened@gentoo.org mailing list
> > --
> > Ned Ludd <solar@gentoo.org>
> > Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer
> >
>
>
> --
> gentoo-hardened@gentoo.org mailing list
--
Ned Ludd <solar@gentoo.org>
Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer