Bug 105847 - error while emerging app-arch/macutil-2.0_beta3
Bug#: 105847 Product:  Gentoo/Alt Version: unspecified Platform: PPC
OS/Version: OS X Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: ppc-macos@gentoo.org Reported By: dirk.schoenberger@freenet.de
Component: Mac OSX
URL: 
Summary: error while emerging app-arch/macutil-2.0_beta3
Keywords:  
Status Whiteboard: 
Opened: 2005-09-13 14:05 0000
Description:   Opened: 2005-09-13 14:05 0000
While trying to emerge macutil-2.0_beta3 I ran into the following problem

In file included from stf.c:3:
stf.h:14: warning: useless storage class specifier in empty declaration
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o lzc.o lzc.c
In file included from lzc.c:4:
lzc.h:28: warning: useless storage class specifier in empty declaration
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o pit.o pit.c
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o sit.o sit.c
In file included from sit.c:4:
sit.h:35: warning: useless storage class specifier in empty declaration
sit.h:56: warning: useless storage class specifier in empty declaration
sit.c:25: warning: useless storage class specifier in empty declaration
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o dia.o dia.c
dia.c:12: warning: conflicting types for built-in function 'malloc'
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o cpt.o cpt.c
In file included from cpt.c:9:
cpt.h:43: warning: useless storage class specifier in empty declaration
cpt.h:64: warning: useless storage class specifier in empty declaration
cpt.c:24: warning: conflicting types for built-in function 'malloc'
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o zma.o 
zma.c
In file included from zma.c:4:
zma.h:45: warning: useless storage class specifier in empty declaration
zma.c:12: warning: conflicting types for built-in function 'malloc'
cc -O -DTYPES_H -DDIRENT_H -DTERMIOS_H -DNODOT -DAPPLEDOUBLE  -O2 -pipe   -c -o lzh.o lzh.c
In file included from lzh.c:4:
lzh.h:48: warning: useless storage class specifier in empty declaration
lzh.c:20: warning: conflicting types for built-in function 'malloc'
lzh.c:29: warning: useless storage class specifier in empty declaration
lzh.c:43: error: static declaration of 'lzh_pointer' follows non-static declaration
lzh.h:61: error: previous declaration of 'lzh_pointer' was here
lzh.c:44: error: static declaration of 'lzh_data' follows non-static declaration
lzh.h:62: error: previous declaration of 'lzh_data' was here
lzh.c:45: error: static declaration of 'lzh_finfo' follows non-static declaration
lzh.h:63: error: previous declaration of 'lzh_finfo' was here
lzh.c:46: error: static declaration of 'lzh_fsize' follows non-static declaration
lzh.h:64: error: previous declaration of 'lzh_fsize' was here
lzh.c:47: error: static declaration of 'lzh_kind' follows non-static declaration
lzh.h:65: error: previous declaration of 'lzh_kind' was here
lzh.c:49: error: static declaration of 'lzh_file' follows non-static declaration
lzh.h:66: error: previous declaration of 'lzh_file' was here
make[1]: *** [lzh.o] Error 1
make: *** [all] Error 2

!!! ERROR: app-arch/macutil-2.0_beta3 failed.
!!! Function src_compile, Line 35, Exitcode 2
!!! build 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 From Peter Beutner 2005-10-05 09:00:18 0000 -------
Created an attachment (id=69926) [details]
gcc4 compile fix

as usual gcc4 exposes some more "coding errors". Here it marks some global vars
as static and then tries to use them in another file.  Fixed by making them
non-static.
note: only compile tested as I have no mac material here atm

------- Comment #2 From Dirk Schoenberger 2005-10-05 13:36:33 0000 -------
> note: only compile tested as I have no mac material here atm

emerges fine on my Tiger (no special USE flags needed)
tools seem to run

------- Comment #3 From Peter Beutner 2005-11-09 21:09:53 0000 -------
cc'ing Mark Loeser:
can you take a look at this one? 
Seems to be that you are the one taking care of gcc4 fixes ;)

------- Comment #4 From Mark Loeser 2005-11-09 21:37:36 0000 -------
Created an attachment (id=72551) [details]
gcc4 fix

That patch should work fine, but technically those variables are not used
anywhere else, so they can remain static and remove the extern's from the
header.

Could someone test this as I don't have a mac to test this stuff on?  (Nor do I
even know what this application does :) )

------- Comment #5 From Fabian Groffen 2005-11-10 01:05:04 0000 -------
I usually replace extern with static in these cases.  Any arguments in favour
of/against that?

------- Comment #6 From Mark Loeser 2005-11-10 09:56:57 0000 -------
(In reply to comment #5)
> I usually replace extern with static in these cases.  Any arguments in favour
> of/against that?

The variables aren't used in any other files, they don't _need_ to be extern
currently.

------- Comment #7 From Peter Beutner 2005-11-11 21:52:58 0000 -------
yup, patch works

------- Comment #8 From Mark Loeser 2005-12-11 11:02:40 0000 -------
In cvs.

------- Comment #9 From Fabian Groffen 2005-12-11 11:12:32 0000 -------
as ~ppc-macos in portage