우분투서버에서 php모듈 설치때

by NoisyWalker posted Jan 28, 2009

root@nb:/serv/src/cubrid-php-scm-2009-01-28/src# ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-shared=PKGS  build shared libraries default=yes
  --enable-static=PKGS  build static libraries default=yes
  --enable-fast-install=PKGS  optimize for fast installation default=yes
  --disable-libtool-lock  avoid locking (might break parallel builds)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libdir=NAME      Look for libraries in .../NAME rather than .../lib
  --with-php-config=PATH  Path to php-config php-config
  --with-cubrid             Include CUBRID support
  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-pic              try to use only PIC/non-PIC objects default=use both
  --with-tags=TAGS      include additional configurations automatic


Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

root@nb:/serv/src/cubrid-php-scm-2009-01-28/src# ./configure --with-cubrid --with-php-config=/serv/php/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /serv/php
checking for PHP includes... -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib
checking for PHP extension directory... /serv/php/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /serv/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... invalid
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for cubrid support... yes, shared
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
root@nb:/serv/src/cubrid-php-scm-2009-01-28/src# make
/bin/bash /serv/src/cubrid-php-scm-2009-01-28/src/libtool --mode=compile gcc  -I. -I/serv/src/cubrid-php-scm-2009-01-28/src -DPHP_ATOM_INC -I/serv/src/cubrid-php-scm-2009-01-28/src/include -I/serv/src/cubrid-php-scm-2009-01-28/src/main -I/serv/src/cubrid-php-scm-2009-01-28/src -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib -I/serv/cubrid/include  -I/serv/php/include/php -DHAVE_CONFIG_H  -O3 -march=athlon-4 -pipe -fomit-frame-pointer   -c /serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid.c -o php_cubrid.lo
mkdir .libs
 gcc -I. -I/serv/src/cubrid-php-scm-2009-01-28/src -DPHP_ATOM_INC -I/serv/src/cubrid-php-scm-2009-01-28/src/include -I/serv/src/cubrid-php-scm-2009-01-28/src/main -I/serv/src/cubrid-php-scm-2009-01-28/src -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib -I/serv/cubrid/include -I/serv/php/include/php -DHAVE_CONFIG_H -O3 -march=athlon-4 -pipe -fomit-frame-pointer -c /serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid.c  -fPIC -DPIC -o .libs/php_cubrid.o
/serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid.c: In function 'zif_cubrid_bind':
/serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid.c:735: warning: cast from pointer to integer of different size
/serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid.c:748: warning: cast from pointer to integer of different size
/bin/bash /serv/src/cubrid-php-scm-2009-01-28/src/libtool --mode=compile gcc  -I. -I/serv/src/cubrid-php-scm-2009-01-28/src -DPHP_ATOM_INC -I/serv/src/cubrid-php-scm-2009-01-28/src/include -I/serv/src/cubrid-php-scm-2009-01-28/src/main -I/serv/src/cubrid-php-scm-2009-01-28/src -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib -I/serv/cubrid/include  -I/serv/php/include/php -DHAVE_CONFIG_H  -O3 -march=athlon-4 -pipe -fomit-frame-pointer   -c /serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid_error.c -o php_cubrid_error.lo
 gcc -I. -I/serv/src/cubrid-php-scm-2009-01-28/src -DPHP_ATOM_INC -I/serv/src/cubrid-php-scm-2009-01-28/src/include -I/serv/src/cubrid-php-scm-2009-01-28/src/main -I/serv/src/cubrid-php-scm-2009-01-28/src -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib -I/serv/cubrid/include -I/serv/php/include/php -DHAVE_CONFIG_H -O3 -march=athlon-4 -pipe -fomit-frame-pointer -c /serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid_error.c  -fPIC -DPIC -o .libs/php_cubrid_error.o
/serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid_error.c: In function 'get_error_msg':
/serv/src/cubrid-php-scm-2009-01-28/src/php_cubrid_error.c:68: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
/bin/bash /serv/src/cubrid-php-scm-2009-01-28/src/libtool --mode=link gcc -DPHP_ATOM_INC -I/serv/src/cubrid-php-scm-2009-01-28/src/include -I/serv/src/cubrid-php-scm-2009-01-28/src/main -I/serv/src/cubrid-php-scm-2009-01-28/src -I/serv/php/include/php -I/serv/php/include/php/main -I/serv/php/include/php/TSRM -I/serv/php/include/php/Zend -I/serv/php/include/php/ext -I/serv/php/include/php/ext/date/lib -I/serv/cubrid/include  -I/serv/php/include/php -DHAVE_CONFIG_H  -O3 -march=athlon-4 -pipe -fomit-frame-pointer   -o cubrid.la -export-dynamic -avoid-version -prefer-pic -module -rpath /serv/src/cubrid-php-scm-2009-01-28/src/modules  php_cubrid.lo php_cubrid_error.lo -Wl,-rpath,/serv/cubrid/lib64 -L/serv/cubrid/lib64 -lcascci
gcc -shared  .libs/php_cubrid.o .libs/php_cubrid_error.o  -L/serv/cubrid/lib64 -lcascci  -march=athlon-4 -Wl,-rpath -Wl,/serv/cubrid/lib64 -Wl,-soname -Wl,cubrid.so -o .libs/cubrid.so
/usr/bin/ld: skipping incompatible /serv/cubrid/lib64/libcascci.so when searching for -lcascci
/usr/bin/ld: skipping incompatible /serv/cubrid/lib64/libcascci.a when searching for -lcascci
/usr/bin/ld: cannot find -lcascci
collect2: ld returned 1 exit status
make: *** [cubrid.la] Error 1
root@nb:/serv/src/cubrid-php-scm-2009-01-28/src#

네이버에서 스냅샷 받아서 했는데
이렇게 에러 떠서 Makefile 확인해봤더니
CUBRID_SHARED_LIBADD = -Wl,-rpath,/serv/cubrid/lib64 -L/serv/cubrid/lib64 -lcascci
이렇게 돼 있어서
CUBRID_SHARED_LIBADD = -Wl,-rpath,/serv/cubrid/lib -L/serv/cubrid/lib -lcascci
로 바꾸고 해결 봤네요

컴퓨터는 64비트가 아닌데 왜 64로 걸렸는지 모르겠군요




Articles