ps2packer not compiling under cygwin ... arrgh cygnus again

General, off-topic discussion about things of interest to the members of these forums.

Moderator: cheriff

Post Reply
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

ps2packer not compiling under cygwin ... arrgh cygnus again

Post by cory1492 »

here is the error, somewhere in there...:

Code: Select all

make[1]: Leaving directory `/usr/local/ps2dev/ps2-packer/stub'
touch stubs-tag.stamp
cp stub/n2e-asm-one-1d00-stub ./b_stub_one
ld -r -b binary b_stub_one -o builtin_stub_one.o
rm b_stub_one
cp stub/n2e-asm-1d00-stub ./b_stub
ld -r -b binary b_stub -o builtin_stub.o
rm b_stub
gcc -O3 -Wall -I. -DVERSION=\"0.4.5\" -DPREFIX=\"/usr/local/ps2dev\" -DPS2_PACKER_LITE ps2-packer.c n2e-packer.c /usr/lib/libucl.a
 builtin_stub_one.o builtin_stub.o -o ps2-packer-lite
ps2-packer.c: In function `remove_section_zeroes':
ps2-packer.c:258: warning: unused variable `whole_size'
ps2-packer.c:259: warning: unused variable `realign'
ps2-packer.c: In function `load_stub':
ps2-packer.c:343: warning: unused variable `size'
ps2-packer.c: In function `packing':
ps2-packer.c:561: warning: passing arg 2 of `remove_section_zeroes' from incompatible pointer type
ps2-packer.c:564: warning: implicit declaration of function `pack_section'
ps2-packer.c: In function `main':
ps2-packer.c:797: warning: implicit declaration of function `signature'
ps2-packer.c:813: warning: int format, u32 arg (arg 2)
ps2-packer.c:813: warning: int format, u32 arg (arg 3)
ps2-packer.c:644: warning: unused variable `buffer'
ps2-packer.c:652: warning: unused variable `packer_module'
/cygdrive/c/DOCUME~1/Cory/LOCALS~1/Temp/ccJY8xTA.o(.text+0x447):ps2-packer.c: undefined reference to `__binary_b_stub_start'
/cygdrive/c/DOCUME~1/Cory/LOCALS~1/Temp/ccJY8xTA.o(.text+0x95b):ps2-packer.c: undefined reference to `__binary_b_stub_one_start'
collect2: ld returned 1 exit status
make: *** [ps2-packer-lite] Error 1[/code
I made libz.a and libucl.a from the ucl and zlib sources, and copied them to the dirs, so that could be the problem...think msys might handle this crud better than cygwin?

whoops, trying to find out where I got ucl from a couple weeks ago and now I am unsure.... looks like I grabbed it from the UCL package for cyqwin, premade...
Last edited by cory1492 on Sun May 08, 2005 11:35 pm, edited 1 time in total.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

But, wtf are you all trying to compile this with cygwin ? I made it compiling perfectly using mingw32, without all that cygwin layering crap. Please use -mno-cygwin when compiling, it'll be much better.

Now, your problem here is obviously the "builtin_stub.o" file. Check its symbols using readelf or objdump.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

Im trying to get the sioshell to compile, but it needs a particular stub from the "latest" one to do so, other than that, that is the only reason (trying to keep the ps2 toolchain from leaking over into msys/mingw)

huh, coders - isnt the point of C/c++ to be portable?

ps the stub is n2e-kmode-1d00-stub
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Then, why not simply downloading the latest compiled version ?
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

which works with cygwin, the linux one or the win32 one?

I didnt realize the precompiled ones were updated past 0.4 or I would have tried that first...

(since were on the subject, I detest cygwin for the reasons you mention, but I like the cygwin toolchain install script, without having to track down mingW/msys wget,cvs, patch etc)

damn, I knew it would be too easy, src compiles fine under cygwin at .4, and works, but the stub is not present - by easy I mean the
make all; make install
present in the build script...guess it comes down to copy/paste from the precomp stuff
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

the n2e-kmode stub is not available in the precompiled win32

obviously some incompatiblility between porting to various platforms, once again I will ask, what is the common ground that EVERYTHING in the cvs SHOULD compile on?
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Code: Select all

pixel@sumarit:/var/www/softwares/ps2-packer$ unzip -l ps2-packer-0.4.5-win32.zip | grep n2e-kmode-1d00
     6432  04-10-05 18:40   stub/n2e-kmode-1d00-stub
readme.txt wrote:Where to find
-------------

The "official" webpage for this tool is on my personal webspace:

http://www.nobis-crew.org/ps2-packer/
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

Thanks for the page pixel, I was assuming what is on the ps2dev.org tools list would provide the latest or at least links to the latest... perhaps someone should update that?
cory1492 wrote:obviously some incompatiblility between porting to various platforms, once again I will ask, what is the common ground that EVERYTHING in the cvs SHOULD compile on?
ming32? linux? cygwin?

cygwin is the recommended one, as it is the easiest to set the toolchain up..
Where to find
-------------

The "official" webpage for this tool is at on my personal webspace:

http://www.nobis-crew.org/ps2-packer/

However, you can find the latests CVS changes into ps2dev's CVS:

http://cvs.ps2dev.org/ps2-packer/
the sioshell readme says LATEST by the way, not 'official' build... makes no diff though, as long as it works.


Woohoo, it works! Thanks Pixel! (for the help and for making ps2packer)
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

I really dislike cygwin, and I'd rather try to help people having a full mingw32 set up than a cygwin set up. I provide toolchain packages for mingw32 mind you. And sioshell too.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

How about a quick guide on what is needed to have a good Mingw32 setup?

Im assuming you need -
Mingw32
Msys

and whatever packages you would install for the compilers youd use
MinGW - Minimalist GNU for Windows at Sourceforge

Which is about where I am with that, (aside from adding ming32's dir to the FSTAB to mount in the msys mingw path), as well I have cross compilers installed for ARM and PPC systems in there ATM (gb/gba/nds and gc compatible devkits from devkitpro at sourceforge)

May as well add your toolchain from:
http://nnoble.nerim.net/ps2dev/

Thanks for doing that btw, saves alot of time waiting for msys to compile it.

Im guessing, using something like the Dev C++ IDE Dev C++ IDE from bloodshed.net would not require msys?

edit: still not entirely sure where to find cvs/patch/wget for mingw32
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Well, the "mingw32" isn't really much different of a very minimalistic glue to port some very easy stuff from unix to win32 api. Thus, if you look for "cvs for mingw32", well, take cvsnt. wget ? have to download stuff thru your mozilla. patch ? I am sure there's a win32 native port of patch.

Going the msys way is going the somewhat hard way, but cleaner way IMHO (albeit I am not a windows user myself I have to admit)

So, to be clear: anything using mingw32 is using the native win32 api. No dll needed, no environment. The DevC++ thingy uses mingw32 internally, indeed. And when you have a plain mingw32 compiler, it is perfectly able to compile MSVC code.


The whole idea of using cygwin here is to "simulate a unix environment 'coz most of us are using unix environments and are not trying hard to help windows users". But apart of the bash shell, and the gnu make, there's not that much of cygwin needed to do ps2dev work under windows...
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

I only wish I could figure out how to add environment paths to msys, like .bashrc does....

damn windows, if everyone else here knew how to use *nix I would scrap it in a minute... ah well, at least I have gentoo on the xbox to fall back on, even with lousy tv resolutions it can be a big help...

thanks pixel, I assume that a ps2-packer does compile under *nix? I know the src from the .4 download on ps2dev.org compiled just fine under cygwin, as I have never tried setting up a cross compiler under linux (aside from the ps2 compiler that all the real work has already been done on) to make windows apps.

edit:/finally - /etc/profile is the place
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Okay, I think I'll provide some infos about how to use mingw32 and msys....

ps2-packer indeed compiles under *nix, and, indeed, work has been done at some point to make it compile under cygwin, but since I am not really paying attention, it may breaks from time to time.

For "setting up a cross compiler under linux", you only need a package... Lots of linux distributions offer such package. I am using the mingw32 package for debian atm, but I know lots of other distributions are offering similar package.


Note that the current makefiles of ps2-packer are made up so that ps2-packer compiles under debian using that mingw32 package.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

now I comprehend what you meant when it was to compile under mingw32 way back... makes much more sense.

Just curious if this is normal when versioning the precompiled ming32 toolchain:

Code: Select all

Cory@NON-H7NPCWFS1E9 ~
$ ee-gcc -v
Reading specs from D:\msys\1.0\local\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\specs

Configured with:
Thread model: single
gcc version 3.2.2
configured with is usually not blank when I do that elsewhere...
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

well, I broke down and made a virtual debian sarge install yesterday, got the toolchain and samba going today, and guess what - ps2-packer compiles just fine on it, as if it wouldnt....

thanks for aiming me at debian pixel, I think I like it (aptitude)....
Post Reply