Subject: CrossCompiling Entire NetBSD-Current Release on MacOSX
To: None <current-users@netbsd.org>
From: KlinT <klint@klintcentral.net>
List: current-users
Date: 03/27/2006 09:28:46
Hi all,

Well, I'm trying to "cross-compile" an i386 release from the  
NetBSD-current Sources on an Apple G4/MacOSX 10.3.9 using XCode Tools.

Everything goes well except an error with some X11 components.

I've built successfully the "toolchain" ( sh build.sh tools )
I've built successfully the "kernel" ( sh build.sh kernel=GENERIC )
But I cannot built the "distribution" ( sh build.sh distribution ) here  
is the logs :
------------------------------------------------------------------------ 
------------------------------------------------------------------------ 
----------------
     .../...
     compile  xkbcomp/xkbparse.lo
        link  xkbcomp/xkbcomp
ld: multiple definitions of symbol _XkbConvertGetByNameComponents
xkbmisc.lo definition of _XkbConvertGetByNameComponents in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbConvertGetByNameComponents in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbConvertXkbComponents
xkbmisc.lo definition of _XkbConvertXkbComponents in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbConvertXkbComponents in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbDetermineFileType
xkbmisc.lo definition of _XkbDetermineFileType in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbDetermineFileType in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbEnsureSafeMapName
xkbmisc.lo definition of _XkbEnsureSafeMapName in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbEnsureSafeMapName in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbFindKeycodeByName
xkbmisc.lo definition of _XkbFindKeycodeByName in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbFindKeycodeByName in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbLookupGroupAndLevel
xkbmisc.lo definition of _XkbLookupGroupAndLevel in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbLookupGroupAndLevel in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbMergeFile
xkbmisc.lo definition of _XkbMergeFile in section (__TEXT,__text)
XKBMisc.lo definition of _XkbMergeFile in section (__TEXT,__text)
ld: multiple definitions of symbol _XkbNameMatchesPattern
xkbmisc.lo definition of _XkbNameMatchesPattern in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbNameMatchesPattern in section  
(__TEXT,__text)
ld: multiple definitions of symbol _XkbWriteXKBKeymapForNames
xkbmisc.lo definition of _XkbWriteXKBKeymapForNames in section  
(__TEXT,__text)
XKBMisc.lo definition of _XkbWriteXKBKeymapForNames in section  
(__TEXT,__text)
ld: multiple definitions of symbol __XkbKSCheckCase
xkbmisc.lo definition of __XkbKSCheckCase in section (__TEXT,__text)
XKBMisc.lo definition of __XkbKSCheckCase in section (__TEXT,__text)
ld: multiple definitions of symbol __XkbStrCaseCmp
xkbmisc.lo definition of __XkbStrCaseCmp in section (__TEXT,__text)
XKBMisc.lo definition of __XkbStrCaseCmp in section (__TEXT,__text)
*** [xkbcomp] Error code 1
1 error
nbmake: stopped in  
/Volumes/DATA1/CROSSCOMP_BSD/TEST/src/x11/tools/xkbcomp
*** [dependall] Error code 2
1 error
nbmake: stopped in  
/Volumes/DATA1/CROSSCOMP_BSD/TEST/src/x11/tools/xkbcomp
*** [dependall-xkbcomp] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src/x11/tools
*** [do-tools] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src/x11
*** [build] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src/x11
*** [do-x11] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src
*** [build] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src
*** [distribution] Error code 2
1 error
nbmake: stopped in /Volumes/DATA1/CROSSCOMP_BSD/TEST/src
ERROR: Failed to make distribution
*** BUILD ABORTED ***
------------------------------------------------------------------------ 
------------------------------------------------------------------------ 
----------------
Any idea ?

For this problem I'm about to try the build on Tiger with more recent  
XCode tools. I think this could solve the problem.

I'd like to know if someone did this before : crosscompiling NetBSD on  
MacOSX ...
Is there any special task to do on the mac to successfully build a  
NetBSD release ?

Many Thanks

Arnaud.