forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

compiling latest toolchain on osx, iconv problem at stage 2

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
f_bohmann



Joined: 02 May 2005
Posts: 16
Location: hamburg, germany

PostPosted: Mon Nov 24, 2008 10:25 pm    Post subject: compiling latest toolchain on osx, iconv problem at stage 2 Reply with quote

heyho... im trying to build the toolchain (svn rev. 2446) for osx for 2 days now, but step 002 fails on me with:

======================================

gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/opt/local/lib -L/opt/local/include//lib -lmpfr -lgmp
Undefined symbols:
"_iconv_close", referenced from:
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_convert_input in libcpp.a(charset.o)
__nl_free_domain_conv in libintl.a(loadmsgcat.o)
"_iconv", referenced from:
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
__nl_find_msg in libintl.a(dcigettext.o)
"_iconv_open", referenced from:
_init_iconv_desc in libcpp.a(charset.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [cc1-dummy] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2
../scripts/002-gcc-4.3.2-stage1.sh: Failed.

======================================

i had to change the 002 script to

../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c" --with-newlib --with-gmp-include=/opt/local/include --with-gmp-lib=/opt/local/lib --with-mpfr=/opt/local/include/ --without-headers --disable-libssp || { exit 1; }

(note the extra paths for gmp and mpfr) since i am using macports an not fink.

any ideas what im missing out? i installed libiconv, added -liconv to the linker flags, but that gives the same error.
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Tue Nov 25, 2008 5:38 am    Post subject: Reply with quote

When I installed libgmp and libmpfr on Leopard I had to run configure passing the path to install to, instead of the default /opt/local.

Code:
./configure --prefix=/usr


I think that was it.
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Tue Nov 25, 2008 7:05 am    Post subject: Reply with quote

Insert_witty_name wrote:
When I installed libgmp and libmpfr on Leopard I had to run configure passing the path to install to, instead of the default /opt/local.

Code:
./configure --prefix=/usr


I think that was it.


Shouldn't this be hard coded into the script?

Wally
Back to top
View user's profile Send private message AIM Address
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Nov 25, 2008 7:26 am    Post subject: Reply with quote

The script doesn't install libgmp and libmpfr. So, no.

Also, installing them into /usr/local is generally a better idea.
Back to top
View user's profile Send private message Visit poster's website
f_bohmann



Joined: 02 May 2005
Posts: 16
Location: hamburg, germany

PostPosted: Wed Nov 26, 2008 2:36 am    Post subject: Reply with quote

ooPo wrote:
The script doesn't install libgmp and libmpfr. So, no.
Also, installing them into /usr/local is generally a better idea.


got it. gmp needs to be compiled with "ABI=32", else it will not match mpfr et al.
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Wed Nov 26, 2008 7:21 am    Post subject: Reply with quote

f_bohmann wrote:
ooPo wrote:
The script doesn't install libgmp and libmpfr. So, no.
Also, installing them into /usr/local is generally a better idea.


got it. gmp needs to be compiled with "ABI=32", else it will not match mpfr et al.


Ahh yes, on Leopard that is true.

I forgot that step.

If you don't, it compiles it as 64-bit which breaks other things.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Nov 27, 2008 12:31 am    Post subject: Reply with quote

If anyone wants to write up a nice readme.osx file with all these little helpful hints, I'd certainly be happy to include it in the psptoolchain package. :)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group