[unixODBC-support] Error building from src.rpm on Centos 4.1

Linus Hicks lihicks at gpi.com
Wed Aug 17 17:23:40 BST 2005


Linus Hicks wrote:
> When I try to build the unixODBC-2.2.11-1.src.rpm, I get permission 
> errors which look like a problem with not prepending $(DESTDIR). I am 
> doing the build as an unprivileged user, so any improper references to 
> installation directories will trigger errors. You will notice that the 
> value I have set for %_topdir is /home/lihicks/rpmbuild and the install 
> for the build is the typical /var/tmp/<package>-root. I searched the 
> mail archives and couldn't find any references to this problem.
> 
> I think the Makefile gets generated properly, so apparently make is not 
> getting invoked with DESTDIR=<installdir>. Can anybody help me with a 
> fix for this problem?

---- snip ----

That problem seems to be fixed by altering the .spec file making it similar to 
the way I have seen it done in other spec files. In the %install section after 
the "cd gODBConfig" where it has:

make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} \ 
install-strip

I changed that to:

make DESTDIR=$RPM_BUILD_ROOT prefix=$RPM_BUILD_ROOT%{prefix} \ 
sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install-strip

I have not tried the following, but I wonder if it would be sufficient:

make DESTDIR=$RPM_BUILD_ROOT install-strip

Also, I noticed that documentation files are being installed in an unusual place 
for RedHat systems. I changed:

Docdir: %{prefix}/doc
to:
Docdir: %{prefix}/share/doc

So now I'm getting this:

Provides: libesoobS.so.1 libnn.so.1 libodbc.so.1 libodbccr.so.1
libodbcdrvcfg1S.so.1 libodbcdrvcfg2S.so.1 libodbcinst.so.1 libodbcminiS.so.1
libodbcmyS.so.1 libodbcnnS.so.1 libodbcpsql.so.1 libodbcpsql.so.2
libodbcpsqlS.so.1 libodbctxt.so.1 libodbctxtS.so.1 liboplodbcS.so.1
liboraodbcS.so.1 libsapdbS.so.1 libtdsS.so.1 libtemplate.so.1
Requires(interp): /bin/sh /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libcrypt.so.1
libcrypt.so.1(GLIBC_2.0) libdl.so.2 libdl.so.2(GLIBC_2.0)
libdl.so.2(GLIBC_2.1) libm.so.6 libm.so.6(GLIBC_2.0) libncurses.so.5
libnsl.so.1 libodbc.so.1 libodbcinst.so.1 libpthread.so.0
libpthread.so.0(GLIBC_2.0) libreadline.so.4
Processing files: unixODBC-devel-2.2.11-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: unixODBC = 2.2.11
Processing files: unixODBC-gui-qt-2.2.11-1
error: File not found by glob:
/var/tmp/unixODBC-2.2.11-root/usr/lib/libodbcinstQ.so*
Processing files: unixODBC-gui-gtk-2.2.11-1
error: File not found: /var/tmp/unixODBC-2.2.11-root/usr/bin/gODBCConfig
error: File not found by glob:
/var/tmp/unixODBC-2.2.11-root/usr/lib/libgtkodbcconfig.so*
Processing files: unixODBC-debuginfo-2.2.11-1


RPM build errors:
     File not found by glob:
/var/tmp/unixODBC-2.2.11-root/usr/lib/libodbcinstQ.so*
     File not found: /var/tmp/unixODBC-2.2.11-root/usr/bin/gODBCConfig
     File not found by glob:
/var/tmp/unixODBC-2.2.11-root/usr/lib/libgtkodbcconfig.so*



More information about the unixODBC-support mailing list