Решение некоторых проблем при компиляции ПО

Проблема:     OS FreeBSD. The following error arise during package installation:

./+POST-INSTALL: permission denied
pkg_add: install script returned error status

Решение:     remove noexec options in /var/fstab file on /tmp partition and remount this partition

# mount -u /tmp

Проблема:     Problem during Postgres dump.

template1=# \c test97
FATAL:  SetDatabaseEncoding(): invalid database encoding
Previous connection kept
template1=# \encoding
SQL_ASCII
template1=#
template1=# DROP DATABASE test97;
ERROR:  DROP DATABASE: database is marked as a template
template1=#
template1=# \l
List of databases
Name         |       Owner        | Encoding
———————-+——————–+———–
test97               |                    | SQL_ASCII

Решение:

template1=# update pg_database set datdba=1 where datname=’test97′;
UPDATE 1
template1=#

template1=# \l
List of databases
Name         |       Owner        | Encoding
———————-+——————–+———–
test97               | pgsql              | SQL_ASCII

template1=# DROP DATABASE test97;
DROP DATABASE
template1=#

Проблема:     Compillation proftpd on 64bit OS

gcc -shared  .libs/mod_opie.o  -L/tmp/ftp/proftpd-1.3.0a/lib -L/usr/kerberos/lib -L/tmp/ftp/opie-2.4/libopie -L/tmp/ftp/opie-2.4/libmissing
-L/tmp/ftp/opie-2.4 -L/usr/local/opie/lib -lopie  -Wl,-soname -Wl,mod_opie.so -o .libs/mod_opie.so
/usr/bin/ld: /tmp/ftp/opie-2.4/libopie/libopie.a(challenge.o): relocation R_X86_64_32 against `a local symbol’ can not be used when making
a shared object; recompile with -fPIC
/tmp/ftp/opie-2.4/libopie/libopie.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake[1]: *** [mod_opie.la] Error 1
gmake[1]: Leaving directory `/tmp/ftp/proftpd-1.3.0a/modules’
gmake: *** [modules] Error 2
ERROR: Can’t make ftp using gmake too.

Решение:     Add “-fPIC” key like :

./configure CFLAGS=’-fPIC’

Проблема:

gcc -DHAVE_CONFIG_H -DFREEBSD4_9 -DFREEBSD4 -I.. -I../include -I../lib/libltdl -I/usr/local/include/gssapi -I/usr/kerberos/include
-I/tmp/ftp/opie-2.4/libopie -I/tmp/ftp/opie-2.4/libmissing -I/tmp/ftp/opie-2.4 -O2 -Wall -DPR_SHARED_MODULE -c mod_gss.c  -fPIC
-DPIC -o .libs/mod_gss.o
In file included from mod_gss.c:58:
../include/mod_gss.h:308: gssapi/gssapi.h: No such file or directory
../include/mod_gss.h:309: gssapi/gssapi_generic.h: No such file or directory
../include/mod_gss.h:310: gssapi/gssapi_krb5.h: No such file or directory
*** Error code 1

Stop in /tmp/ftp/proftpd-1.3.0a/modules.
*** Error code 1

Stop in /tmp/ftp/proftpd-1.3.0a.

Решение:     FreeBSD: Install krb5 package

fbsd49# pkg_info -L krb5-1.6 | grep gssapi_krb5.h
/usr/local/include/gssapi/gssapi_krb5.h
fbsd49#

Add /usr/local/include path to –with-includes key

–with-includes=<…>:/usr/local/include

Linux: Install krb5-devel package
Проблема:     Sudo compilation (make)

gcc -o sudo check.o env.o getspwuid.o gettime.o goodpath.o fileops.o find_path.o  interfaces.o logging.o parse.o set_perms.o sudo.o
sudo_edit.o  tgetpass.o zero_bytes.o  sudo_auth.o pam.o sudo.tab.o lex.yy.o alloc.o defaults.o memrchr.o closefrom.o  -lcrypt -lpam  -lcompat
set_perms.o: In function `runas_setup’:
set_perms.o(.text+0x254): undefined reference to `setusercontext’
sudo.o: In function `set_loginclass’:
sudo.o(.text+0x1748): undefined reference to `login_getclass’
sudo.o(.text+0x179d): undefined reference to `login_getclass’
*** Error code 1

Решение:

env LDFLAGS=-lutil ./configure …

Проблема:     Apache compilation (make)

/usr/bin/ld: /usr/lib/libexpat.a(xmlparse.o): relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object;
recompile with -fPIC
/usr/lib/libexpat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Решение:     It means expat has some code (/usr/lib/libexpat.a) not build correctly with -fPIC.
You should recompile expat (/usr/lib/libexpat.a) with -fPIC

cd <expat_src_directory>
./configure CFLAGS=’-fPIC’ …
make
make install

Проблема:     Unable to set long file name. Press <Enter> to proseed.
Problem arises if computer has two or more OS, has installed Acronis OSSelector and Windows OS.

Решение:     In OSSelector panel:
1. Select menu Utilities –> Configurator (or press Ctrl-S)
2. Select menu View –> Operation systems (or press F5)
3. Select line
System: Windows 2000 (grean color) and press property botton in taskbar
4. Select tab “Directories”
5. There is something like :

C:\DOCUME~1
C:\PROGRA~1
C:\WINDOWS
Long name:
Document and settings

6. Clean (delete) values “Long name” for “C:\DOCUME~1” and “C:\PROGRA~1” it has to be empty.
7. Press OK two time.
That is all. Now you can use OSSelector with your Windows without any issues.

Проблема:     Compilation Snort with Snortsam plugin

plugbase.o(.text+0xade): In function `InitOutputPlugins’:
../../src/plugbase.c:939: undefined reference to `AlertFWsamSetup’
collect2: ld returned 1 exit status
make[3]: *** [snort] Error 1

Решение:     Run “sh autojunk.sh” before configure

Проблема:     LAME MP3 Encoder 3.97 compialtion

then mv -f “.deps/brhist.Tpo” “.deps/brhist.Po”; else rm -f “.deps/brhist.Tpo”; exit 1; fi
brhist.c:63:21: curses.h: No such file or directory
brhist.c:65:20: term.h: No such file or directory
brhist.c: In function `brhist_init’:
brhist.c:180: warning: implicit declaration of function `tgetent’
brhist.c:187: warning: implicit declaration of function `tgetnum’
brhist.c:195: warning: implicit declaration of function `tgetstr’
brhist.c:195: warning: assignment makes pointer from integer without a cast
brhist.c:200: warning: assignment makes pointer from integer without a cast
brhist.c:205: warning: assignment makes pointer from integer without a cast
brhist.c:210: warning: assignment makes pointer from integer without a cast
make[2]: *** [brhist.o] Error 1
make[2]: Leaving directory `/tmp/temp-lame-3.97/lame-3.97/frontend’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/temp-lame-3.97/lame-3.97′
make: *** [all] Error 2

Решение:     Install ncurses-devel

Проблема:     Configuration Nut (Network UPS tools)

checking whether to build CGI programs… no
checking whether to build upsclient library… no
checking whether to build serial drivers… yes
configure: error: “Net-SNMP libraries not found, required for SNMP drivers”

Решение:     Install net-snmp-devel package

Проблема:     Configuration Nut (Network UPS tools)

checking whether to build upsclient library… no
checking whether to build serial drivers… yes
checking whether to build SNMP drivers… yes
configure: error: USB drivers requested, but libusb not found. Use –with-usb=auto to build only available drivers.

Решение:     Install libusb-devel package

Проблема:     Configuration Nut (Network UPS tools)

checking whether to build serial drivers… yes
checking whether to build SNMP drivers… yes
checking whether to build USB drivers… yes
configure: error: “libhal not found, required for HAL support”

Решение:     Install hal-devel package

Проблема:     Nut (Network UPS tools) compilation

gcc -I../include -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-DNETSNMP_ENABLE_IPV6 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4
-m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Ulinux -Dlinux=linux -I/usr/include/rpm -D_REENTRANT
-D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -I. -I/usr/include/net-snmp
-O -Wall -Wsign-compare -o snmp-ups snmp-ups.o ../common/upsconf.o ../common/parseconf.o ../common/state.o main.o dstate.o
../common/libcommon.a -lcrypto -L/usr/lib -lnetsnmp
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
make[1]: *** [snmp-ups] Error 1
make[1]: Leaving directory `/home/test/build/src/nut-2.2.1/drivers’
make: *** [all-recursive] Error 1

Решение:     Install openssl-devel package

Проблема:     Nut (Network UPS tools) compilation

make[2]: Leaving directory `/tmp/temp-nut-2.2.1/nut-2.2.1/common’
if gcc -DHAVE_CONFIG_H -I. -I. -I../include    -I../include -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include  -DNETSNMP_ENABLE_IPV6 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
–param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Ulinux -Dlinux=linux -D_REENTRANT
-D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -I. -I/usr/include/net-snmp
-O -Wall -Wsign-compare -MT main-hal.o -MD -MP -MF “.deps/main-hal.Tpo” -c -o main-hal.o main-hal.c; \
then mv -f “.deps/main-hal.Tpo” “.deps/main-hal.Po”; else rm -f “.deps/main-hal.Tpo”; exit 1; fi
In file included from main-hal.c:23:
dstate-hal.h:28:18: error: glib.h: No such file or directory
dstate-hal.h:29:28: error: dbus/dbus-glib.h: No such file or directory
dstate-hal.h:30:37: error: dbus/dbus-glib-lowlevel.h: No such file or directory
In file included from main-hal.c:23:
dstate-hal.h:43: error: expected asm or __attribute__ before dbus_init_local
main-hal.c:507:2: warning: “/*” within comment
main-hal.c: In function main:
main-hal.c:465: warning: unused variable do_forceshutdown
main-hal.c:465: warning: unused variable i
main-hal.c:463: warning: unused variable dbus_connection
make[1]: *** [main-hal.o] Error 1
make[1]: Leaving directory `/tmp/temp-nut-2.2.1/nut-2.2.1/drivers’
make: *** [all-recursive] Error 1

Решение:     Install dbus-glib-devel package

Проблема:     MythTV compilation

libavformat -L../libmythui -L../libmythupnp -L../libmythmpeg2 -L../libmythdvdnav -L../libmythfreemheg -L../libmythlivemedia
-lmyth-0.21 -lmythavutil-0.21 -lmythavcodec-0.21 -lmythavformat-0.21 -lmythui-0.21 -lmythupnp-0.21 -lmythmpeg2-0.21
-lmythdvdnav-0.21 -lmythfreemheg-0.21 -lmythlivemedia-0.21 -lz -lfreetype -lmp3lame -lXrandr -lqt-mt -lGLU -lGL -lXmu
-lXext -lX11 -lm -lpthread
/usr/bin/ld: cannot find -lXmu
collect2: ld returned 1 exit status
make[2]: *** [libmythtv-0.21.so.0.21.0] Error 1
make[2]: Leaving directory `/tmp/temp-mythtv-0.21/mythtv-0.21/libs/libmythtv’
make[1]: *** [sub-libmythtv] Error 2
make[1]: Leaving directory `/tmp/temp-mythtv-0.21/mythtv-0.21/libs’
make: *** [sub-libs] Error 2

Решение:     Install libXmu-devel package

Проблема:     Clamdmail compilation

cd . && /bin/sh /root/111/clamav-0.93/clamdmail-0.19/missing –run autoheader
Can’t locate object method “path” via package “Autom4te::Request” at /usr/bin/autom4te line 81.
autoheader: /usr/bin/autom4te failed with exit status: 1
make: *** [config.h.in] Error 1

Решение:     Update autoconf

Проблема:     mod_auth_kerb compilation

gcc -DMOD_SSL=208131 -DUSE_HSREGEX -DEAPI -DEAPI_MM -fpic -DSHARED_MODULE -I. -Ispnegokrb5 -I/usr/include -I/usr/include/gssapi
-c spnegokrb5/init_sec_context.c
spnegokrb5/init_sec_context.c: In function ‘gss_init_sec_context_spnego’:
spnegokrb5/init_sec_context.c:154: error: ‘u_char’ undeclared (first use in this function)
spnegokrb5/init_sec_context.c:154: error: (Each undeclared identifier is reported only once
spnegokrb5/init_sec_context.c:154: error: for each function it appears in.)
spnegokrb5/init_sec_context.c:154: error: ‘tmp’ undeclared (first use in this function)
apxs:Break: Command failed with rc=1
*** Error code 1

Решение:     Add the following patch mod_auth_kerb-5.3.tipes.patch

diff -ruN mod_auth_kerb-5.3 mod_auth_kerb-5.3.patch
diff -ruN mod_auth_kerb-5.3/config.h.in mod_auth_kerb-5.3.patch/config.h.in
— mod_auth_kerb-5.3/config.h.in       2005-08-05 15:16:29.000000000 +0000
+++ mod_auth_kerb-5.3.patch/config.h.in 2008-05-06 14:13:17.000000000 +0000
@@ -17,3 +17,5 @@

/* Define if your GSSAPI library supports handling SPNEGO tokens */
#undef GSSAPI_SUPPORTS_SPNEGO
+
+#include <sys/types.h>

Проблема:     Configuration libwmf (FreeBSD)

checking png.h usability… no
checking png.h presence… no
checking for png.h… no
configure: error: * * * unable to find “png.h” which is required by libwmf * * *

Решение:     Install libpng

Проблема:     Making libwmf (FreeBSD)

gcc -DHAVE_CONFIG_H -DPACKAGE=\”libwmf\” -DVERSION=\”0.2.8\” -I. -I. -I../.. -I../../include -I../../src -I../../src/extra/gd
-I../.. -g -O2 -I/usr/include/freetype2 -I/usr/include -MT xgd.lo -MD -MP -MF .deps/xgd.Tpo -c xgd.c  -fPIC -DPIC -o .libs/xgd.o
In file included from xgd.c:62:
../../src/ipa/xgd/device.h: In function ‘wmf_gd_device_open’:
../../src/ipa/xgd/device.h:38: error: ‘ddata’ undeclared (first use in this function)
../../src/ipa/xgd/device.h:38: error: (Each undeclared identifier is reported only once
../../src/ipa/xgd/device.h:38: error: for each function it appears in.)
*** Error code 1

Решение:     Install libjpeg

Проблема:     Apache start

Syntax error on line 18 of /usr/local/etc/apache/httpsd.conf:
Cannot load /usr/local/libexec/apache/mod_macro.so into server: /usr/local/libexec/apache/mod_macro.so: Undefined symbol “ap_make_array”

or

Syntax error on line 205 of /usr/local/etc/apache/httpsd.conf:
Cannot load /usr/local/libexec/apache/mod_mmap_static.so into server: /usr/local/libexec/apache/mod_mmap_static.so: Undefined symbol “ap_null_cleanup”

Решение:     Create script /usr/bin/objformat :

cat > /usr/bin/objformat << “EOF”
#!/bin/sh
echo elf
EOF

chmod a+x /usr/bin/objformat

and recompile Apache

Проблема:     Compilation CourierAuthLib:

preauthvchkpw.c: In function ‘auth_vchkpw_pre’:
preauthvchkpw.c:67: warning: passing argument 1 of ‘parse_email’ discards qualifiers from pointer target type
preauthvchkpw.c:141: warning: passing argument 3 of ‘vset_lastauth’ discards qualifiers from pointer target type
authdaemond.c:28:18: error: ltdl.h: No such file or directory
authdaemond.c:48: error: expected specifier-qualifier-list before ‘lt_dlhandle’
authdaemond.c: In function ‘initmodules’:
authdaemond.c:97: warning: implicit declaration of function ‘lt_dlclose’
authdaemond.c:97: error: ‘struct authstaticinfolist’ has no member named ‘h’

authdaemond.c:958: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
gmake[2]: *** [authdaemond.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2

Решение:     Install package libltdl

Проблема:     Compilation CourierAuthLib:

preauthvchkpw.c: In function ‘auth_vchkpw_pre’:
preauthvchkpw.c:67: warning: passing argument 1 of ‘parse_email’ discards qualifiers from pointer target type
preauthvchkpw.c:141: warning: passing argument 3 of ‘vset_lastauth’ discards qualifiers from pointer target type
authdaemond.c:28:18: error: ltdl.h: No such file or directory
authdaemond.c:48: error: expected specifier-qualifier-list before ‘lt_dlhandle’
authdaemond.c: In function ‘initmodules’:
authdaemond.c:97: warning: implicit declaration of function ‘lt_dlclose’
authdaemond.c:97: error: ‘struct authstaticinfolist’ has no member named ‘h’

authdaemond.c:958: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
gmake[2]: *** [authdaemond.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2

Решение:     Install package libltdl

Проблема:     GLIB compilation

cd . && /usr/local/bin/bash /tmp/libs/gd-2.0.35/config/missing –run autoheader
configure.ac:5: error: Autoconf version 2.54 or higher is required
configure.ac:5: the top level
autoheader: autom4te253 failed with exit status: 1
at /usr/local/bin/autoheader line 163
*** Error code 1

Stop in /tmp/libs/gd-2.0.35.

Решение:     Install Autoconf version 2.54 or higher but do not uninstall old Autoconf version

Проблема:     gdome2 configuration :

checking whether to build static libraries… yes
creating libtool
checking for pkg-config… (cached) /usr/bin/pkg-config
checking for glib-2.0… Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc’ to the PKG_CONFIG_PATH environment variable No package ‘glib-2.0’ found
configure: error: Library requirements (glib-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

Решение:     locate glib-2.0.pc file and Initialize PKG_CONFIG_PATH environment variable with path to this file, like : PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure …

Проблема:     gdome2 configuration :

checking for pkg-config… /usr/bin/pkg-config
checking for glib-2.0… yes
checking GLIB_CFLAGS… -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
checking GLIB_LIBS… -L/usr/local/lib -lglib-2.0
checking for pkg-config… (cached) /usr/bin/pkg-config
checking for GLIB – version >= 2.2.0… no
*** Could not run GLIB test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: Could not find GLIB (see config.log for details).

Решение:     1. Install glib-2.0 2. If glib-2.0 already installed, try to use –disable-glibtest configuration key.

Теги: , ,

Ви повинні залогінитися ,щоб залишити коментар.