link problem, huge number of files

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

Moderators: cheriff, TyRaNiD

Post Reply
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

link problem, huge number of files

Post by Kristof »

Hi,

I'm facing a bad problem while linker. The command stops quickly with a simple "make: *** [out] Error 1" and no error message.

My guess is that the number of objects I have is too big (330). (I'm recompiling C64 Vice emulator).

Someone know if there is a limitation of the number of objects that can be linked .... ??

Reducing number of object make the link work (I means, It fail with link error, but do not stop before making something).



Second question : I can create two libs files containing each half of the object. But what are the options of psp-ld to create a .a file ?

Thanks
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

static .a-archives are created using "ar cru <libname.a> <objects>".
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

Thanks, I'm going to try this ...
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

It works fine.

Thanks a lot !!!


Now I have another problem with macro PSP_MODULE_INFO in C++ that do not want to compile.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Kristof wrote:Now I have another problem with macro PSP_MODULE_INFO in C++ that do not want to compile.
You need PSPSDK from SVN, as the PSP_MODULE_INFO C++ thing was fixed shortly after the beta release.
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

Thanks mrbrown.

I'm not using beta release. I'm using subversion base from 31 August. I'll try an update to see if things have change whith that macro.
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

No way of compiling that line ... :(

I'm got rid of it by recopyng the whole macro in my main. This is not the best method, but it compile. Not sure it will work (actually it fails when launching, but I do not know why).

The outpatch.exe also say me "modulename" not found. I think all is linked.

This kind of stuff are the very bad side of developpement. So much time wasted.
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

outpatch? err....thats no more needed with the latest pspsdk... check one of the latest examples on how they are build, maybe that solves the problems for you.
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

In fact, I did not manage to compile samples in pspsdk. The auto generated makefile did not work for samples. So I do not have any valid make makefile for sample, and I took a makefile from another package "pspdev"...

As I'm very weak in makefile, I admit I do not understand everything around it.

I've check the makefiles in pspsdk and they are complex as hell. I'm going to check on the forum if someone already posted a simple single makefile for pspsdk samples.

--

For PSP_MODULE_INFO I'm going to forget C++.
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

uhm that indicates serious problems with your setup.... if pspsdk is installed correctly, the samples should just compile. i'd fix that first and then try again whatever you are doing.
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

Try using a Makefile from pspgl/test-*/, these are based on the pspgl/tools/psp-install script, this simplifies them somewhat.

Nevertheless your toolchain seems broken, maybe you're better deleting your toolchain installation and restart toolchain.sh to get a fresh one...
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

maybe you're better deleting your toolchain installation
I already spend hours installing it, better die than reinstalling the whole thing again :)
Try using a Makefile from pspgl/test-*/
I'll try this thanks.



PSP_MODULE_INFO is not compiling in C (different error).
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

Try using a Makefile from pspgl/test-*/
The PSP_MODULE_INFO of that package compile well. Thanks. :)

Now it produce a pbp but it does not boot... Still need to search...
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

I just compiled a sample of pspsdk (cube) using makefile and changing the minimum of things in it ... it generate a nice bootable elf, but that elf is not bootable "impossible launch".

Still need to read this forum again :)
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

try "make kxploit" :)
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

I'm already using the kxploit tool to transfert the eboot file to psp.

But thanks for hints. The "make kxploit" does not work, but I like the idea :)
User avatar
groepaz
Posts: 305
Joined: Thu Sep 01, 2005 7:44 am
Contact:

Post by groepaz »

But thanks for hints. The "make kxploit" does not work, but I like the idea :)
well it should. you really should fix your setup
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

Yes I know, but so close to my goal, I really do not want to reinstall the whole thing again. I'm very ignorant in autoconfig makefile, so when it fail in the middle of installation, it is very embarassing.

I'll try to find what is going wrong with the samples.
holger
Posts: 204
Joined: Thu Aug 18, 2005 10:57 am

Post by holger »

when you built and installed the toolchain properly, the samples and test programs should compile&run out-of-the-box, without touching anything.
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

You are right.

The packages are always like this. If everything is ok then it is simple, but if there is one error then it is hell.

I'm going to check everything to understand how it works. The best way to solve problems is to understand them.

---

No results. I bet I'll have to make the installation again :)

But I'm understanding more things everyday. I'll soon understand the mystery of building a version.

==> In fact, I need to install the toolchain. I never succeded in completing the script installation, so I took the toolchain of the zip "pspdev".
Kristof
Posts: 46
Joined: Fri May 20, 2005 10:31 pm

Post by Kristof »

Following you advices, I just start a fresh installation from scratch.

This time the toolchain built well (after 1h30).

I think my other PC (the one were the build failed) have a problem. (cygwin tell me he can not create the /tmp dir, that's surely a problem).

Thanks all.
Post Reply