Re: perl 5.10.0 / osx 10.5.2 'make' dies at "error: redefinition of 'union semun'"

[email protected] (snowcrash+perl)
Newsgroups perl.macosx
Message-ID <[email protected]>
hi,

On Wed, Mar 5, 2008 at 11:17 AM, Edward Moy <[email protected]> wrote:
> Configure determines this by trying to compile:
>
> ----------- try.c -----------
> #include <sys/types.h>
> #include <sys/ipc.h>
> #include <sys/sem.h>
> int main () { union semun semun; semun.buf = 0; }
> ------------------------------
>
> What happens when you try to compile the above program?

with

	gcc --version
		powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5531)
	gcc -v try.c

looks ok to me,


	Using built-in specs.
	Target: powerpc-apple-darwin9
	Configured with:
/usr/ports/gcc_42-5531/gcc_42-5531/build/obj/src/configure
--disable-checking -enable-werror --prefix=/usr
--mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9
--target=powerpc-apple-darwin9
	Thread model: posix
	gcc version 4.2.1 (Apple Inc. build 5531)
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/cc1 -quiet -v
-D__DYNAMIC__ try.c -fPIC -quiet -dumpbase try.c
-mmacosx-version-min=10.5 -auxbase try -version -o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccDnzd3s.s
	ignoring nonexistent directory
"/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../../../powerpc-apple-darwin9/include"
	#include "..." search starts here:
	#include <...> search starts here:
	 /usr/local/include
	 /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include
	 /usr/include
	 /System/Library/Frameworks (framework directory)
	 /Library/Frameworks (framework directory)
	End of search list.
	GNU C version 4.2.1 (Apple Inc. build 5531) (powerpc-apple-darwin9)
		compiled by GNU C version 4.2.1 (Apple Inc. build 5531).
	GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
	Compiler executable checksum: 388881bffcb05d987b0795677d6c6078
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/as -arch ppc -o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccTS1Z3j.o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccDnzd3s.s
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/collect2 -dynamic -arch
ppc -macosx_version_min 10.5 -weak_reference_mismatches non-weak -o
a.out -lcrt1.10.5.o -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../..
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccTS1Z3j.o
-lgcc_s.10.5 -lgcc -lSystemStubs -lSystem

> I forgot to mention that I'm still using the 4.0.1 compiler, while it looks
> like you're using the 4.2 compiler.  If the above fails to compile with 4.2,
> you might try compiling try.c with 4.0.1 just to see if 4.2 has a bug
> (though I would think this unlikely).

	gcc_select 4.0
		Default compiler has been set to:
		gcc version 4.0.1 (Apple Inc. build 5465)
	gcc -v try.c

	Using built-in specs.
	Target: powerpc-apple-darwin9
	Configured with: /var/tmp/gcc/gcc-5465~16/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --program-prefix=
--host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
	Thread model: posix
	gcc version 4.0.1 (Apple Inc. build 5465)
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/cc1 -quiet -v
-D__DYNAMIC__ try.c -fPIC -quiet -dumpbase try.c
-mmacosx-version-min=10.5 -auxbase try -version -o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccNmRTyR.s
	ignoring nonexistent directory
"/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../../../powerpc-apple-darwin9/include"
	#include "..." search starts here:
	#include <...> search starts here:
	 /usr/local/include
	 /usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include
	 /usr/include
	 /System/Library/Frameworks (framework directory)
	 /Library/Frameworks (framework directory)
	End of search list.
	GNU C version 4.0.1 (Apple Inc. build 5465) (powerpc-apple-darwin9)
		compiled by GNU C version 4.0.1 (Apple Inc. build 5465).
	GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
	Compiler executable checksum: 9f5f0a20bb36a9596f05e3c117ac5032
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/as -arch ppc -o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccvNbScg.o
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccNmRTyR.s
	 /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/collect2 -dynamic -arch
ppc -macosx_version_min 10.5 -weak_reference_mismatches non-weak -o
a.out -lcrt1.10.5.o -L/usr/lib/powerpc-apple-darwin9/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../../powerpc-apple-darwin9/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/../../..
/var/folders/fi/fi+R69XvFXyPa7H6QIvBUk+++TI/-Tmp-//ccvNbScg.o
-lgcc_s.10.5 -lgcc -lSystemStubs -lSystem


looks effectively the same; only diff is:

GCC 4.2 -> ... --build=powerpc-apple-darwin9
--host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
GCC 4.0 -> ... --build=i686-apple-darwin9 ..
--host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.