Ответы пользователя по тегу C++
  • Почему не получается собрать модуль apache на ubuntu?

    unreturned
    @unreturned
    А в директории .libs/ смотрели?

    unreturned@kovalkov:/tmp/reailip2$ sudo apxs2 -c mod_realip2.c 
    Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
    /usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread  -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I -I. -I/usr/include -I/usr/include/apr-1.0     -I/usr/include/apache2  -I/usr/include/apr-1.0   -I/usr/include/apr-1.0 -I/usr/include  -c -o mod_realip2.lo mod_realip2.c && touch mod_realip2.slo
    /usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -Wl,--as-needed -Wl,-z,relro   -o mod_realip2.la  -rpath /usr/lib/apache2/modules -module -avoid-version    mod_realip2.lo
    unreturned@kovalkov:/tmp/reailip2$ ls -all
    total 28
    drwxr-xr-x 3 unreturned unreturned 4096 Jan 18 01:46 .
    drwxrwxrwt 6 root       root       4096 Jan 18 01:46 ..
    drwxr-xr-x 2 root       root       4096 Jan 18 01:46 .libs
    -rw-r--r-- 1 unreturned unreturned 6243 Jan 18 01:46 mod_realip2.c
    -rw-r--r-- 1 root       root        949 Jan 18 01:46 mod_realip2.la
    -rw-r--r-- 1 root       root        291 Jan 18 01:46 mod_realip2.lo
    -rw-r--r-- 1 root       root          0 Jan 18 01:46 mod_realip2.slo
    unreturned@kovalkov:/tmp/reailip2$ cd .libs/
    unreturned@kovalkov:/tmp/reailip2/.libs$ ls -all
    total 36
    drwxr-xr-x 2 root       root        4096 Jan 18 01:46 .
    drwxr-xr-x 3 unreturned unreturned  4096 Jan 18 01:46 ..
    lrwxrwxrwx 1 root       root          17 Jan 18 01:46 mod_realip2.la -> ../mod_realip2.la
    -rw-r--r-- 1 root       root         950 Jan 18 01:46 mod_realip2.lai
    -rw-r--r-- 1 root       root        6224 Jan 18 01:46 mod_realip2.o
    -rwxr-xr-x 1 root       root       13556 Jan 18 01:46 mod_realip2.so
    unreturned@kovalkov:/tmp/reailip2/.libs$ cd ../


    Также, произвести сразу установку модуля можно добавлением флага -i

    sudo apxs2 -c -i mod_realip2.c 
    Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1.
    /usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread  -DLINUX=2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I -I. -I/usr/include -I/usr/include/apr-1.0     -I/usr/include/apache2  -I/usr/include/apr-1.0   -I/usr/include/apr-1.0 -I/usr/include  -c -o mod_realip2.lo mod_realip2.c && touch mod_realip2.slo
    /usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -Wl,--as-needed -Wl,-z,relro   -o mod_realip2.la  -rpath /usr/lib/apache2/modules -module -avoid-version    mod_realip2.lo
    /usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_realip2.la /usr/lib/apache2/modules
    /usr/share/apr-1.0/build/libtool --mode=install cp mod_realip2.la /usr/lib/apache2/modules/
    libtool: install: cp .libs/mod_realip2.so /usr/lib/apache2/modules/mod_realip2.so
    libtool: install: cp .libs/mod_realip2.lai /usr/lib/apache2/modules/mod_realip2.la
    libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib/apache2/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /usr/lib/apache2/modules
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    chmod 644 /usr/lib/apache2/modules/mod_realip2.so
    Ответ написан
    1 комментарий