0

I am trying to build php from rpm source and it fails on centos 5 32bit. building of php 5.2.6. I get error as follows:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/php-5.2.6-2-root-root
error: Installed (but unpackaged) file(s) found:
   /usr/lib/php/modules/pdo_dblib.so


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/lib/php/modules/pdo_dblib.so

I want to build including pdo_dblib so I did make some modifications but not sure what i have changed. Following is what I have

ln -sf ../configure
%configure \
    --enable-maintainer-zts \
        --cache-file=../config.cache \
        --with-libdir=%{_lib} \
        --with-config-file-path=%{_sysconfdir} \
        --with-config-file-scan-dir=%{_sysconfdir}/php.d \
        --disable-debug \
        --with-pic \
        --disable-rpath \
        --without-pear \
        --with-bz2 \
        --with-curl \
        --with-exec-dir=%{_bindir} \
        --with-freetype-dir=%{_prefix} \
        --with-png-dir=%{_prefix} \
        --enable-gd-native-ttf \
        --without-gdbm \
        --with-gettext \
        --with-gmp \
        --with-iconv \
        --with-jpeg-dir=%{_prefix} \
        --with-openssl \
        --with-png \
        --with-pspell \
        --with-expat-dir=%{_prefix} \
        --with-pcre-regex=%{_prefix} \
        --with-zlib \
        --with-layout=GNU \
        --enable-exif \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-sysvsem --enable-sysvshm --enable-sysvmsg \
        --enable-track-vars \
        --enable-trans-sid \
        --enable-yp \
        --enable-wddx \
        --with-kerberos \
        --enable-ucd-snmp-hack \
        --with-unixODBC=shared,%{_prefix} \
        --enable-memory-limit \
        --enable-shmop \
        --enable-calendar \
        --enable-dbx \
        --enable-dio \
        --without-mime-magic \
        --without-sqlite \
        --with-libxml-dir=%{_prefix} \
        --with-xml \
        --with-system-tzdata \
        --with-tsrm-pthreads \
        --with-mssql=shared,%{_prefix} \
        --enable-pdo \
        --with-pdo-odbc=unixODBC,%{_prefix} \
        $*
if test $? != 0; then
  tail -500 config.log
  : configure failed
  exit 1
fi

make %{?_smp_mflags}
}

# Build /usr/bin/php-cgi with the CGI SAPI, and all the shared extensions
pushd build-cgi
build --enable-force-cgi-redirect \
      --enable-pcntl \
      --with-imap=shared --with-imap-ssl \
      --enable-mbstring=shared --enable-mbstr-enc-trans \
      --enable-mbregex \
      --with-ncurses=shared \
      --with-gd=shared \
      --enable-bcmath=shared \
      --enable-dba=shared --with-db4=%{_prefix} \
      --with-xmlrpc=shared \
      --with-ldap=shared --with-ldap-sasl \
      --with-mysql=shared,%{_prefix} \
      --with-mysqli=shared,%{_bindir}/mysql_config \
      --with-mssql=shared,%{_prefix} \
      --enable-dom=shared \
      --with-dom-xslt=%{_prefix} --with-dom-exslt=%{_prefix} \
      --with-pgsql=shared \
      --with-snmp=shared,%{_prefix} \
      --enable-soap=shared \
      --with-xsl=shared,%{_prefix} \
      --enable-xmlreader=shared --enable-xmlwriter=shared \
      --enable-fastcgi \
      --enable-pdo=shared \
      --with-pdo-odbc=shared,unixODBC,%{_prefix} \
      --with-pdo-mysql=shared,%{_prefix} \
      --with-pdo-pgsql=shared,%{_prefix} \
      --with-pdo-sqlite=shared,%{_prefix} \
      --with-pdo-dblib=shared,%{_prefix} \
      --enable-json=shared \
      --enable-zip=shared \
      --with-readline \
      --enable-dbase=shared \
      --with-mcrypt=shared,%{_prefix} \
      --with-mhash=shared,%{_prefix} \
      --with-tidy=shared,%{_prefix} \
      --with-mssql=shared,%{_prefix}
popd

# Build Apache module, and the CLI SAPI, /usr/bin/php
pushd build-apache
build --with-apxs2=%{_sbindir}/apxs \
      --without-mysql --without-gd \
      --without-odbc --disable-dom \
      --disable-dba --with-unixODBC \
      --enable-pdo --disable-xmlreader --disable-xmlwriter \
      --disable-json
popd

# Build for inclusion as embedded script language into applications,
# /usr/lib[64]/libphp5.so
pushd build-embedded
build --enable-embed \
      --without-mysql --without-gd \
      --without-odbc --disable-dom \
      --disable-dba --with-unixODBC \
      --enable-pdo --disable-xmlreader --disable-xmlwriter \
      --disable-json
popd

Is this correct?

shorif2000
  • 2,582
  • 12
  • 65
  • 137

1 Answers1

1

Usually that error is attributed to not including the file in the %files section. Just add it to that section and you should be good to go, or at least get an error with some more information in the event something is still wrong.

Forrest
  • 1,370
  • 9
  • 20
  • im newbie in rpm building, where exactly do i add it and what do i add? – shorif2000 Mar 15 '13 at 15:39
  • @sharif Take a look at the documentation I linked, as it explains where things need to go and the different sections of the %files section. It should be near the bottom of your spec file. (do you have the spec file, or just the configure script?) – Forrest Mar 15 '13 at 20:36
  • what do i need to add exactly? – shorif2000 Mar 18 '13 at 08:05
  • In the %files section add something like this: %attr(755, root, root) /usr/lib/php/modules/pdo_dblib.so Obviously you will need the change the permissions and ownership, looking at the files around that one in the %files section should show some examples. – Forrest Mar 18 '13 at 18:00