Linking problem with libcurl and __ctype_ptr

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
kerm
Posts: 7
Joined: Wed May 30, 2007 6:31 pm
Location: Austria, Bad Goisern

Linking problem with libcurl and __ctype_ptr

Post by kerm »

Is there a solution for this problem. I am using the newest toolchain.

Greeting from Austria

Kerm
make[1]: Entering directory `/home/kerm/Source/PSP/ffmpeg-15.02.2007/ffplay_resample'
psp-gcc -I.. -I../etc -I./jonny -I../libavformat -I../libavcodec -I../libavutil -I/usr/local/pspdev/psp/sdk/../include -I/usr/local/pspdev/psp/sdk/../include/freetype2 -I../MyTTF -I../libmpeg -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -g -Wall -DHAVE_AV_CONFIG_H -D_PSP_FW_VERSION=150 -L.. -L/usr/local/pspdev/psp/sdk/../lib -L. -L/usr/local/pspdev/psp/sdk/lib ffplay.o mytext.o mystring.o mydrawtext.o mydrawbmp.o mytextdata.o myevent.o myjpeg.o myaudio.o HanLib/han_lib.o PspLib/pg.o opendir.o net_io.o iniparser.o dictionary.o strlib.o jonny/csc.o jonny/mem64.o jonny/mestub.o jonny/me.o jonny/me_csc.o jonny/avc.o jonny/mpegbase.o jonny/cpu_clock.o -lttf -ljpeg -lfreetype -lavformat -lavutil -lavcodec -lfaad2 -lvorbis -lvorbisenc -logg -lz -lm -lpspgu -lpsppower -lpspaudiolib -lpspaudio -lcurl -lpspmpeg -lssl -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o PMPVLC009_JockyW.elf
/usr/local/pspdev/psp/sdk/../lib/libcurl.a(mprintf.o): In function `dprintf_DollarString':
/home/kerm/Source/PSP/libcurl/lib/mprintf.c:170: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/usr/local/pspdev/psp/sdk/../lib/libcurl.a(url.o): In function `Curl_connect':
/home/kerm/Source/PSP/libcurl/lib/url.c:2787: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/url.c:2861: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/url.c:3075: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/url.c:2650: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/url.c:2963: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/url.c:2673: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/usr/local/pspdev/psp/sdk/../lib/libcurl.a(transfer.o): In function `Curl_readwrite':
/home/kerm/Source/PSP/libcurl/lib/transfer.c:748: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/transfer.c:758: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/transfer.c:863: relocation truncated to fit: R_MIPS_GPREL16 against `__ctype_ptr'
/home/kerm/Source/PSP/libcurl/lib/transfer.c:943: additional relocation overflows omitted from the output
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [PMPVLC009_JockyW.elf] Fehler 1
kerm
Posts: 7
Joined: Wed May 30, 2007 6:31 pm
Location: Austria, Bad Goisern

Post by kerm »

I found a solution. Seams to be a compiler optimization problem.
After building libcurl with "make CFLAGS=-G0" the linking problem is gone.

Please could somebody update the libcurl svn repository.

-- Kerm
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Updated README.PSP in the repository for libcurl:

Code: Select all

This is a port of libcurl 7.15.1 for the PSP, based originally on danzel's patches but
I have cleaned them up, in part because I added gethostbyname/addr to newlib itself.

To build configure the source with:

LDFLAGS="-L$(psp-config --psp-prefix)/lib -L$(psp-config --pspsdk-path)/lib" \
                LIBS="-lc -lpspnet_inet -lpspnet_resolver -lpspuser" \
                ./configure --host=psp --disable-shared --prefix=$(psp-config --psp-prefix)

Then just:

make CFLAGS=-G0 && make install

TyRaNiD
Enjoy!
Post Reply