Hi,

I have been keeping my eye on openpkg for a while, and I now have an
opportunity to deploy it. I tried to bootstrap from source openpkg-1.1.1
on a Solaris 8 machine on which someone else had installed gcc 2.95.2 in
/usr/local/bin (from sunfreeware.com I think).

Using the recent rsync example from SysAdmin mag as a mini-tutorial of
sorts, I proceeded as far as the installation of openpkg-1.1.1 into
/usr/local/opkg via the openpkg-1.1.1-1.1.1.sparc64-solaris2.8-ulo.sh
script that was created by openpkg-1.1.1-1.1.1.src.sh

Beyond that, when I tried to build from the src.rpm of rsync, it appeared
that rpm/libtool insisted on using 'cc'. I tried re-doing everything
without /usr/ucb in my PATH, but it still croaked.

Here's an example (/usr/local/opkg/bin and /usr/local/bin are in my PATH):

------------------------------------------------------------------
/usr/local/opkg $ /d2/e/openpkg/sw/var/petidomo/bin/rpm --rebuild 
/opt/src/rsync-2.5.5-1.1.0.src.rpm
Installing /opt/src/rsync-2.5.5-1.1.0.src.rpm
/usr/local/opkg/lib/openpkg/rpmtool: cc: not found
Executing(%prep): env -i /usr/local/opkg/lib/openpkg/bash --norc
--noprofile --p
osix -e /usr/local/opkg/RPM/TMP/rpm-tmp.15043
+ cd /usr/local/opkg/RPM/TMP
+ cd /usr/local/opkg/RPM/TMP
+ rm -rf rsync-2.5.5
+ /usr/local/opkg/lib/openpkg/gzip -dc
/usr/local/opkg/RPM/SRC/rsync/rsync-2.5.5.tar.gz
+ /usr/local/opkg/lib/openpkg/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd rsync-2.5.5
++ id
++ sed 's/[^=]*=\([0-9][0-9]*\).*$/\1/'
+ '[' 59999 = 0 ']'
++ id
++ sed 's/[^=]*=\([0-9][0-9]*\).*$/\1/'
+ '[' 59999 = 0 ']'
+ chmod -Rf a+rX,g-w,o-w .
+ echo 'Patch #0 (rsync.patch):'
Patch #0 (rsync.patch):
+ /usr/local/opkg/lib/openpkg/patch -p0 -s
+ exit 0
Executing(%build): env -i /usr/local/opkg/lib/openpkg/bash --norc
--noprofile --
posix -e /usr/local/opkg/RPM/TMP/rpm-tmp.31881
+ cd /usr/local/opkg/RPM/TMP
+ cd rsync-2.5.5
+ CC=cc
+ CFLAGS=-O
+ ./configure --prefix=/usr/local/opkg --disable-debug
--with-included-popt
configure: Configuring rsync 2.5.5
checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking target system type... sparc-sun-solaris2.8
checking for gcc... cc
checking for C compiler default output... configure: error: C compiler
cannot cr
eate executables
error: Bad exit status from /usr/local/opkg/RPM/TMP/rpm-tmp.31881 (%build)


RPM build errors:
    Bad exit status from /usr/local/opkg/RPM/TMP/rpm-tmp.31881 (%build)
/usr/local/opkg $
------------------------------------------------------------------

The openpkg handbook mentions this:

"There exist some exceptions to these requirements. Installation of
OpenPKG on Debian Linux will fail unless GNU gettext and libpam0g-dev are
installed. Also, to later build packages like jdk-sun, the library
compat-libstdc++ must exist. Particular caution goes to Solaris users who
may find a cc command on a freshly installed system to be nothing more
than a useless wrapper script."

Unfortunately, this didn't help 8-( The useless /usr/ucb/cc is commonly
known amongst admins at my site, which is why this machine had gcc
installed. I was hoping for some workaround ...

After some trial and error, I finally found the ...etc/openpkg/rpmmacros
file which I edited to change:

 %l_cc                    %{l_tool_locate cc}
to:
 %l_cc                    /usr/local/bin/gcc

I was then able to compile make, then gcc-3.2 from src.rpm files at
ftp.openpkg.org. After that, I reverted the above change in rpmmacros to
the original, and I was able to build rsync (libtool picked up
/usr/local/opkg/bin/cc, which seems to be a hard link to the same
binary as /usr/local/opkg/bin/gcc).

So,
        - is there a better way to do this?
        - Could I have simply symlink'd /usr/local/opkg/bin/cc to
          /usr/local/bin/gcc ?
        - is there a 'from source' tutorial or other docs that I should've
          read or should read?

Thanks,
--
Vinod
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to