Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105858 - error while emerging app-arch/rzip-2.0-r1
Summary: error while emerging app-arch/rzip-2.0-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: PPC OS X
: High normal (vote)
Assignee: Gentoo for Mac OS X
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-13 14:20 UTC by Dirk Schoenberger
Modified: 2008-08-01 15:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rzip-2.0-darwin.patch (rzip-2.0-darwin.patch,772 bytes, patch)
2005-09-15 10:14 UTC, Fabian Groffen
Details | Diff
extended patch that uses autoconf to check fort strndup (rzip-2.0-darwin.patch,685 bytes, patch)
2005-09-17 08:17 UTC, Fabian Groffen
Details | Diff
patches applied to the sources (rzip-2.0-darwin.patch,877 bytes, patch)
2005-09-17 09:10 UTC, Fabian Groffen
Details | Diff
strutils.c (strutils.c,1012 bytes, text/plain)
2005-09-17 09:11 UTC, Fabian Groffen
Details
strutils.h (strutils.h,1003 bytes, text/plain)
2005-09-17 09:12 UTC, Fabian Groffen
Details
patched ebuild (ebuild.diff,1.29 KB, patch)
2005-09-17 10:52 UTC, Fabian Groffen
Details | Diff
cleaned up patch (rzip-2.0-darwin.patch,5.72 KB, patch)
2005-09-21 20:57 UTC, Brian Harring (RETIRED)
Details | Diff
updated ebuild patch. (rzip-2.0-r1.ebuild.patch,1.01 KB, patch)
2005-09-21 20:58 UTC, Brian Harring (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schoenberger 2005-09-13 14:20:13 UTC
while trying to emerge rzip 2.0-r1 I ran into the following problem

checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
checking for errno in errno.h... yes
checking for mmap... yes
checking for strerror... yes
checking for getopt_long... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
gcc -I. -I. -O2 -pipe -c rzip.c -o rzip.o
gcc -I. -I. -O2 -pipe -c runzip.c -o runzip.o
gcc -I. -I. -O2 -pipe -c main.c -o main.o
main.c: In function 'write_magic':
main.c:50: error: 'uint32_t' undeclared (first use in this function)
main.c:50: error: (Each undeclared identifier is reported only once
main.c:50: error: for each function it appears in.)
main.c:50: error: parse error before "v"
main.c:62: error: 'v' undeclared (first use in this function)
main.c: In function 'read_magic':
main.c:78: error: 'uint32_t' undeclared (first use in this function)
main.c:78: error: parse error before "v"
main.c:92: error: 'v' undeclared (first use in this function)
main.c: In function 'decompress_file':
main.c:143: warning: assignment makes pointer from integer without a cast
make: *** [main.o] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: app-arch/rzip-2.0-r1 failed.
!!! Function src_compile, Line 567, Exitcode 2
!!! emake failed


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




!!! Relying on the shell to locate gcc, this may break
!!! DISTCC, installing gcc-config and setting your current gcc
!!! profile will fix this
Portage 2.0.52-r1 (default-darwin/macos/10.4, gcc-4.0.0, libsystem-7.1-r0, 8.2.0 Power Macintosh)
===============================================================
==
System uname: 8.2.0 Power Macintosh powerpc
macos-20041118
distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632) [disabled]
dev-lang/python:     [Not Present]
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  [Not Present]
sys-devel/automake:  [Not Present]
sys-devel/binutils:  [Not Present]
sys-devel/libtool:   [Not Present]
virtual/os-headers:  7.1
ACCEPT_KEYWORDS="ppc-macos ~ppc-macos"
AUTOCLEAN="yes"
CBUILD="powerpc-apple-darwin"
CFLAGS="-O2 -pipe"
CHOST="powerpc-apple-darwin"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distlocks sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/
gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc emboss imagemagick nls png ppc-macos sdl userland_Darwin kernel_Darwin elibc_Darwin"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Fabian Groffen gentoo-dev 2005-09-15 10:14:08 UTC
Created attachment 68517 [details, diff]
rzip-2.0-darwin.patch

Weird.	I didn't get the error you report, though I got a problem with strndup
which is not available on BSD it seems.  So I made a simple patch which appears
to work for me, attached here.	I'd like to find out why you have those errors
which I don't have.
Comment 2 Dirk Schoenberger 2005-09-15 15:11:15 UTC
> Weird.  I didn't get the error you report, though I got a problem with strndup
> which is not available on BSD it seems.  So I made a simple patch which appears
> to work for me, attached here.  I'd like to find out why you have those errors
> which I don't have.

Didn't work for me ;(
However, I could get it at least to compile if I add a

#include <stdint.h> in main.c or rzip.h
Comment 3 Fabian Groffen gentoo-dev 2005-09-16 00:31:23 UTC
do you have the latest XCode tools installed?
Comment 4 Dirk Schoenberger 2005-09-16 14:12:19 UTC
> do you have the latest XCode tools installed?

XCode 2.0 (came with my Tiger CD)
Build 514, I suppose.


Latest is XCode 2.1, I think.
Comment 5 Fabian Groffen gentoo-dev 2005-09-16 14:45:18 UTC
but which one do you have installed?

I use XCode 2.1, build 621
Comment 6 Dirk Schoenberger 2005-09-16 14:57:48 UTC
> but which one do you have installed?

XCode 2.0 (came with my Tiger CD)
Build 514
Comment 7 Fabian Groffen gentoo-dev 2005-09-16 15:00:00 UTC
Do you care about upgrading?  We only support the latest XCode tools, because it
also solves a lot of linker problems.
Comment 8 Dirk Schoenberger 2005-09-16 16:26:05 UTC
> Do you care about upgrading?  We only support the latest XCode tools, because it
> also solves a lot of linker problems.

Done upgrading to XCode 2.1
With the patch rzip emerges fine.
Comment 9 Fabian Groffen gentoo-dev 2005-09-17 00:44:41 UTC
Ok, then I will check this one on Pather today, and see if it works there too
with the latest Xcode available there.  I think I can check this in later today.
 Thanks for trying Dirk.
Comment 10 Fabian Groffen gentoo-dev 2005-09-17 04:29:53 UTC
compiled and worked on Panther also.

I am hestitant to put this in portage in the same ebuild.  ferringb, could you
advise on this patch whether to apply is unconditional or not, and put it in the
current ebuild, or in a -r2?  And do you agree with it?
Comment 11 Brian Harring (RETIRED) gentoo-dev 2005-09-17 04:39:52 UTC
Yuck.
Conditionally pull in a strndup function is my preferred solution.
Comment 12 Fabian Groffen gentoo-dev 2005-09-17 08:17:02 UTC
Created attachment 68679 [details, diff]
extended patch that uses autoconf to check fort strndup

this patch uses autoconf to check for strndup and uses replacement code only
when not available.
Comment 13 Fabian Groffen gentoo-dev 2005-09-17 09:10:43 UTC
Created attachment 68680 [details, diff]
patches applied to the sources

Another attempt to fix the issue, this time a little bit decent.

I created a separate file that holds the strndup implementation.  It's header
file is now included by the main.c file.  The strndup code is optional based on
the existence of strndup according to configure.
Comment 14 Fabian Groffen gentoo-dev 2005-09-17 09:11:27 UTC
Created attachment 68681 [details]
strutils.c

strutils.c file which implements strndup
Comment 15 Fabian Groffen gentoo-dev 2005-09-17 09:12:08 UTC
Created attachment 68682 [details]
strutils.h

header file for strutils.c
Comment 16 Fabian Groffen gentoo-dev 2005-09-17 10:52:04 UTC
Created attachment 68688 [details, diff]
patched ebuild

these are my changes to the ebuild to get the previously supplied files and
patches working
Comment 17 Dirk Schoenberger 2005-09-17 14:53:38 UTC
> these are my changes to the ebuild to get the previously supplied files and
> patches working

I think the code looks good, and the package emerges fine.
Comment 18 Brian Harring (RETIRED) gentoo-dev 2005-09-21 20:57:19 UTC
Created attachment 68987 [details, diff]
cleaned up patch

Hola.  cleaned up the patch a bit, fixing up lot of old/icky autoconf crap with
it, and lack of DESTDIR make support.

please take it for a spin;
Comment 19 Brian Harring (RETIRED) gentoo-dev 2005-09-21 20:58:55 UTC
Created attachment 68988 [details, diff]
updated ebuild patch.
Comment 20 Dirk Schoenberger 2005-09-22 11:19:28 UTC
> Hola.  cleaned up the patch a bit, fixing up lot of old/icky autoconf crap with
> it, and lack of DESTDIR make support.

> please take it for a spin;

Emerges fine here.
Comment 21 Brian Harring (RETIRED) gentoo-dev 2005-09-22 14:47:58 UTC
patch is in as rzip-2.0-r1, keyword at your leisure. ;)
Comment 22 Fabian Groffen gentoo-dev 2005-09-23 08:56:05 UTC
-r2 I assume/know for sure.

now also available for ~ppc-macos-xians

Brian, thanks for your additional patching/efforts!
Comment 23 Stupid Bugzilla 2008-08-01 15:57:39 UTC
This "cleaned up" patch that is "fixing up lot of old/icky autoconf crap with it" broke rzip on at least x86. See bug [217552]. And yes, I choose ugly but working  over nice but breaking silently every time.