[vbox-dev] Config.kmk needs changed when build on Snow Leopard

Christian Pötzsch Christian.Poetzsch at Sun.COM
Tue Jun 15 16:53:34 GMT 2010


Hi Ken,

that is rather strange. Are you sure that it doesn't work with a
unmodified Config.kmk. Also make sure there isn't any LocalConfig.kmk.
Your patch removes the -mmacosx-version-min and -syslibroot params which
are necessary to select the right sdk.

A quick look on my local system shows that it links against
/usr/lib/libiconv.2.dylib and this works fine. Please make also sure
that you didn't have any other libiconv flying around (/usr/local!).

Christian

PS: Please attach the patch the next time, cause here I'm not sure where
the line breaks are.

On 06/15/10 17:34, Kentaro KAWAMOTO wrote:
> Hi,
> 
> I'm trying to build rev.30187 on Snow Leopard 64bit following
> instructions here.
> http://www.virtualbox.org/wiki/Mac%20OS%20X%20build%20instructions
> 
> To build successfully, however, I need to add "-L/opt/local/lib to
> Config.kmk as follows.
> 
> 
> Index: Config.kmk
> ===================================================================
> --- Config.kmk  (revision 30187)
> +++ Config.kmk  (working copy)
> @@ -1643,7 +1643,7 @@
>   VBOX_DARWIN_DEF_SDK_OBJCFLAGS   :=
> -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot
> $(VBOX_PATH_MACOSX_SDK)
>   VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS :=
> -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot
> $(VBOX_PATH_MACOSX_SDK)
>   VBOX_DARWIN_DEF_SDK_LDFLAGS      =
> -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN)
> -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK) \
> -       -Wl,-headerpad_max_install_names $(VBOX_DARWIN_CLASSIC_LINKER)
> $(VBOX_DARWIN_NO_COMPACT_LINKEDIT)
> +       -Wl,-headerpad_max_install_names $(VBOX_DARWIN_CLASSIC_LINKER)
> $(VBOX_DARWIN_NO_COMPACT_LINKEDIT) -L/opt/local/lib
> 
>   # specific versions.
>   ## @todo s/VBOX_DARWIN_DEF_SDK_10/VBOX_DARWIN_SDK_10/g
> 
> 
> 
> otherwise, I got error on link phase.
> 
> kBuild: Linking VBoxRT
> Undefined symbols:
>   "_libiconv_open", referenced from:
>       rtStrConvertUncached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int)in utf8-posix.o
>       rtstrConvertCached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int, void**)in
> utf8-posix.o
>   "_libiconv", referenced from:
>       rtStrConvertUncached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int)in utf8-posix.o
>       rtstrConvertCached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int, void**)in
> utf8-posix.o
>   "_libiconv_close", referenced from:
>       rtStrConvertUncached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int)in utf8-posix.o
>       rtStrConvertUncached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int)in utf8-posix.o
>       rtstrConvertCached(void const*, unsigned long, char const*,
> void**, unsigned long, char const*, unsigned int, void**)in
> utf8-posix.o
>       _rtStrIconvCacheDestroy in utf8-posix.old: symbol(s) not
> foundcollect2: ld returned 1 exit status
> 
> 
> Looks like it tried to link /usr/lib/libiconv.dylab, which is slightly old.
> 
> %  /usr/bin/iconv --version iconv (GNU libiconv 1.11)
> Copyright (C) 2000-2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Bruno Haible.
> 
> % /opt/local/bin/iconv --version
> iconv (GNU libiconv 1.13)
> Copyright (C) 2000-2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Written by Bruno Haible.
> 
> 
> I'd appreciate it if you update Config.kmk in repository.
> If my change is not correct, please advise.
> 
> 
> Thanks,
> Ken
> 


-- 
Dr. Christian Pötzsch   --    http://www.sun.com/

=================================================
Sitz der Gesellschaft: Sun Microsystems GmbH,
Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Jürgen Kunz
=================================================




More information about the vbox-dev mailing list