Jump to content

Fedora 11 - compile error and SE Linux [solved]


Recommended Posts

  • MTA Team

While we are looking into providing binarys we came across a problem on Fedora 11 (maybe other versions and distributions as well)

/bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..    -I./../pme -g -O2 -MT libehs_la-httpresponse.lo -MD -MP -MF .deps/libehs_la-httpresponse.Tpo -c -o libehs_la-httpresponse.lo `test -f 'httpresponse.cpp' || echo './'`httpresponse.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I./../pme -g -O2 -MT libehs_la-httpresponse.lo -MD -MP -MF .deps/libehs_la-httpresponse.Tpo -c httpresponse.cpp  -fPIC -DPIC -o .libs/libehs_la-httpresponse.o
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:9: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp:15: warning: deprecated conversion from string constant to 'char*'
httpresponse.cpp: In function 'char' CreateHttpTime()â:
httpresponse.cpp:32: error: 'sprintf' was not declared in this scope
httpresponse.cpp: In member function 'void HttpResponse::SetBody(const char*, int)':
httpresponse.cpp:106: error: 'sprintf' was not declared in this scope
make[3]: *** [libehs_la-httpresponse.lo] Error 1
make[3]: Leaving directory `/home/MTA10/svn/branches/1.0/vendor/ehs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/MTA10/svn/branches/1.0/vendor'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/MTA10/svn/branches/1.0'
make: *** [all] Error 2
[hans@F11 1.0]#

Quickfix:

Open the file ./vendor/ehs/httpresponse.cpp in your favorite editor (nano, vi, emacs, ... )

After

#include "httpresponse.h"
add (on a new line)
#include

========================================================================================

SE Linux

SELinux can also cause a problem. When starting the server you get the following error:

/home/MTA10/svn/branches/1.0/MTA10_Server/output/net.so: cannot restore segment prot after reloc: Permission denied

ERROR: Loading network library (net.so) failed!

Press Q to shut down the server!

SElinux (present in newer 2.6 kernels) is refusing certain rights to our net.so .

You can either disable SElinux (e.g. by running)

/usr/sbin/setenforce 0
. But that would not be the way a good sysadmin works.

You can also change the security context of the files involved. As root, run the following commands:

relative to the output dir that houses mta-server

[root@F11 output]# chcon -t textrel_shlib_t core.so

[root@F11 output]# chcon -t textrel_shlib_t xmll.so

[root@F11 output]# chcon -t textrel_shlib_t net.so

[root@F11 output]# chcon -t textrel_shlib_t mods/deathmatch/deathmatch.so

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...