11 February 2018, 00:27 | #101 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
You know you can help fix this if only you learn how to github?
|
11 February 2018, 01:12 | #102 |
Registered User
Join Date: Dec 2015
Location: USA
Posts: 2,902
|
I sort of know how to github. But I don't really have any idea about setting up an Amidevcpp cross compiler, I mean I have it installed.
|
11 February 2018, 01:52 | #103 | ||
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
*sigh* Quote:
open a dos prompt (cmd.exe) cd to the .../AmiDevCpp/bin/ folder start bash.exe now you export your PATH: export PATH=/cygdrive/d/AmiDevCpp/usr/local/amiga/bin:/cygdrive/d/AmiDevCpp/bin:$PATH thats for D:\AmiDevCpp\usr\local\amiga\bin and D:\AmiDevCpp\bin now you can start ppc-amigaos-gcc.exe look in /cygdrive/d/AmiDevCpp/usr/local/amiga/bin for the other cross-compilers you may add the export line to ~/.bashrc ( /home/$USER/.bashrc ) Last edited by emufan; 11 February 2018 at 02:04. |
||
11 February 2018, 06:26 | #104 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
Code:
make[5]: Entering directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/ppc-morphos/libb32/libgcc' # If this is the top-level multilib, build all the other # multilibs. /tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/xgcc -B/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/ -B/gg/ppc-morphos/bin/ -B/gg/ppc-morphos/lib/ -isystem /gg/ppc-morphos/include -isystem /gg/ppc-morphos/sys-include -g -O2 -mbaserel32 -mstrict-align -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc -I../../../../libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../libgcc/../gcc/libgcc2.c \ In file included from ../../../../libgcc/../gcc/libgcc2.c:29: ../../../../libgcc/../gcc/tsystem.h:87:19: error: stdio.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:90:23: error: sys/types.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:93:19: error: errno.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:100:20: error: string.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:101:20: error: stdlib.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:102:20: error: unistd.h: No such file or directory ../../../../libgcc/../gcc/tsystem.h:108:18: error: time.h: No such file or directory make[5]: *** [Makefile:359: _muldi3.o] Error 1 make[5]: Leaving directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/ppc-morphos/libb32/libgcc' make[4]: *** [Makefile:975: multi-do] Error 1 make[4]: Leaving directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/ppc-morphos/libgcc' make[3]: *** [Makefile:109: all-multi] Error 2 make[3]: Leaving directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/ppc-morphos/libgcc' make[2]: *** [Makefile:11223: all-target-libgcc] Error 2 make[2]: Leaving directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build' make[1]: *** [Makefile:745: all] Error 2 make[1]: Leaving directory '/tmp/tmp.ttt/gcc4/gcc-4.4.5/build' make: *** [Makefile:121: gcc4_make] Error 2 it made a $TMPDIR folder in /tmp but this is gone :/ #1) this one: trap "rm -rf \"$TMPDIR\"" exit ????? if so, please remove this Last edited by emufan; 11 February 2018 at 06:51. |
|
11 February 2018, 13:28 | #105 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
11 February 2018, 14:29 | #106 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
11 February 2018, 14:39 | #107 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
11 February 2018, 16:43 | #108 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
I dont think it's related to the symlink. I made it this way:
Code:
mkdir -p /gg/ppc-morphos/bin cd /gg/ppc-morphos/bin ln -s /opt/ppc-warpos/bin/* . is replacing the $TMPDIR (mktemp -d) with something static, so another start of the toolchain script would use the same folder and does skip already built things. hopefully. toolchain-morphos: Code:
#TMPDIR="`mktemp -d`" TMPDIR="`mkdir /tmp/build-ppc`" fi CURDIR="`pwd`" #if [ -z "$TMPDIR" ] #then # echo "Unable to create temporary directory." # exit 1 #fi # trap "rm -rf \"$TMPDIR\"" exit it needs the include/* aswell: Code:
mkdir -p /gg/ppc-morphos/include/ cd /gg/ppc-morphos/include/ ln -s /opt/ppc-warpos/include/* . so it's a problem related to the "--prefix" vs. /gg/ppc-morphos/ path #2) maybe this does the trick even better: Code:
mkdir -p /gg/ppc-morphos/ cd /gg/ppc-morphos/ ln -s /opt/ppc-warpos/ppc-morphos/* . $ ls -l bin -> /opt/ppc-warpos/ppc-morphos/bin include -> /opt/ppc-warpos/ppc-morphos/include lib -> /opt/ppc-warpos/ppc-morphos/lib sys-include -> /opt/ppc-warpos/ppc-morphos/sys-include cd .../morphos-cross-toolchain/ ./toolchain-morphos -f --gcc gcc4 --prefix /opt/ppc-warpos do not yet exists on a fresh install. Code:
mkdir -p /gg/ mkdir -p /opt/ppc-warpos/ppc-morphos/ cd /gg/ ln -s /opt/ppc-warpos/ppc-morphos . cd .../morphos-cross-toolchain/ ./toolchain-morphos --gcc gcc4 --prefix /opt/ppc-warpos both needed when building libgcc. #3) libgcc build successfully now, and I start `make`in /tmp/tmp.tttt/gcc4/gcc-4.4.5/build/ it does skip already build things, so we'll see how far we can go this time Last edited by emufan; 11 February 2018 at 17:53. |
11 February 2018, 22:29 | #109 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
some more errors:
#1) Code:
/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/xgcc -B/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/ -B/gg/ppc-morphos/bin/ -B/gg/ppc-morphos/lib/ -isystem /gg/ppc-morphos/include -isystem /gg/ppc-morphos/sys-include -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../libiberty/fopen_unlocked.c -o fopen_unlocked.o ../../../libiberty/fopen_unlocked.c:73:23: error: stdio_ext.h: No such file or directory make[3]: *** [Makefile:675: fopen_unlocked.o] Error 1 there is one in cygwin/usr/include, but not in the cross-toolchain. the one from cygwin does not work, gives alot errors. so I disabled the include from /tmp/tmp.ttt/gcc4/gcc-4.4.5/libiberty/fopen_unlocked.c and it does build the objectfiles. #2) Code:
/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/xgcc -B/tmp/tmp.ttt/gcc4/gcc-4.4.5/build/./gcc/ -B/gg/ppc-morphos/bin/ -B/gg/ppc-morphos/lib/ -isystem /gg/ppc-morphos/include -isystem /gg/ppc-morphos/sys-include -c -DHAVE_CONFIG_H -g -O2 -mclib=libnix -mstrict-align -I. -I../../../../libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../../libiberty/strsignal.c -o strsignal.o ../../../../libiberty/strsignal.c:554: error: conflicting types for ‘psignal’ /gg/ppc-morphos/include/signal.h:131: note: previous declaration of ‘psignal’ was here make[2]: *** [Makefile:1057: strsignal.o] Error 1 libiberty/strsignal.c: line 551: Code:
#ifndef HAVE_PSIGNAL void psignal (int signo, char *message) { Code:
#ifndef _POSIX_SOURCE ... void psignal __P((unsigned int, const char *)); #define HAVE_PSIGNAL in libiberty/strsignal.c: line 550 does the trick. #3) it did finish, reusing the $TMPDIR in build script, I did restart the script. script installes most of the files to /gg/ instead of --prefix=/opt/ppc-warpos :/ #4) i just moved all those things from /opt/ppc-warpos to /gg/ , export PATH and it does work, nothing build with it, not yet patched to warpos Code:
$ ppc-morphos-gcc-4 --version ppc-morphos-gcc-4 (GCC/MorphOS) 4.4.5 #5) in the current state of the toolchain build script, use this: Code:
./toolchain-morphos --gcc gcc4 --prefix /gg Last edited by emufan; 12 February 2018 at 19:50. |
12 February 2018, 20:16 | #110 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
now using Hedeon's mos2wos pack,
I think I need to build warpcollect on my cygwin system: Code:
ppc-morphos-gcc-4 -warpup -O2 helloworld.c -o helloworld.exe ppc-morphos-gcc-4: error trying to exec '/gg/lib/gcc-lib/ppc-morphos/4.4.5/warpcollect': execv: Exec format error warpcollect: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (SYSV), not stripped, with debug_info /gg/bin/Elf2Exe2: AmigaOS loadseg()ble executable/binary #1) no elf2exe2, now I remember a discussion about the missing src. Code:
Future: - If the Elf2Exe2 source can be supplied, any host with target ppc-morphos could compile also for WarpOS. Please let me know if you have it or know where to find it (It actually already can. but you would have to invoke Elf2Exe2 manually). should build object file with that option. Code:
/gg/bin/ppc-morphos-gcc-4 -warpup -O2 helloworld.c -c -o helloworld.exe Last edited by emufan; 12 February 2018 at 20:38. |
12 February 2018, 20:23 | #111 | |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
Quote:
|
|
12 February 2018, 20:45 | #112 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
12 February 2018, 20:46 | #113 | |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
Quote:
and unfortunately yes, warpcollectElf2exe2 is a warpos binary... and there's no source to be found anywhere. Last edited by Marlon_; 12 February 2018 at 21:19. |
|
12 February 2018, 20:50 | #114 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
12 February 2018, 20:51 | #115 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
12 February 2018, 20:52 | #116 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
winuae + qemu-plugin + warpos works fine for that purpose though, and you need to try the compiled binary anyway. =)
|
12 February 2018, 20:54 | #117 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
12 February 2018, 20:58 | #118 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
As stated before, this is a work in progress, and I am hoping the WarpOS guys would chip in and help make this into a complete toolchain for WarpOS some day. With the effort Bebbo has put in to make gcc produce hunk-file formatted binaries, it shouldn't be impossible to implement this in the MorphOS toolchain so we don't need the elf2exe. It won't be easy though and it's above my level.
|
12 February 2018, 21:05 | #119 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
I run elf2exe2 and got some error: Code:
Elf2Exe2 helloworld.exe helloworld2.exe Error: Undefined Symbol: printf Error: Error processing Elffile ! helloworld.exe build with: /gg/bin/ppc-morphos-gcc-4 -warpup -O2 helloworld.c -c -o helloworld.exe |
|
12 February 2018, 21:16 | #120 |
Semi-Retired
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
|
Hi,
warpcollect source is available, not the one for Elf2Exe2. I'm not sure what you mean by -c and object file/ELF binary. Object files (.o) are in ELF format. When -c is used libcwos.a is not linked (which contains printf). You should omit -c when producing ELF executables. Then libcwos gets linked then Elf2Exe2 has a valid target. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
emufan can you please port this to Amiga!!? | xboxown | Coders. C/C++ | 93 | 29 November 2017 09:06 |
Just curious; Graphics Card | Sim085 | support.Hardware | 31 | 12 October 2017 15:27 |
Curious about Natami | Pat the Cat | Amiga scene | 13 | 07 January 2017 22:16 |
Hey hey, new guy here... | CarlosTex | Member Introductions | 4 | 05 August 2011 01:29 |
hey hey 16k | Amiga1992 | Nostalgia & memories | 5 | 16 August 2006 22:26 |
|
|