English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 06 June 2017, 22:38   #301
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by bebbo View Post
The first hurdle is that the standard approach
Code:
--target=m68k-amigaos
fails. Because of a jodeldiplom you have to use
Code:
--target=amiga-m68k
so you are past that?

i just looked at your gcc diffs
https://github.com/gcc-mirror/gcc/co...b74985ab353fbb
and it shouldnt to be to difficult to merge in even though aros is 6.3.0 and yours 6.3.1. already. one could create an alternative diff to build aros compiler for the time being and check out if and how it works. i know kalamatee is against too much changes in order to have an option to push it upstream an have it eventually accepted.

the main issues for now are probably though the scripts adoptations. this will be beyond my abilities. but i might try to create diff in if need be without too much typos i hope.
wawa is offline  
Old 08 June 2017, 19:16   #302
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Sorry to barge into this amazing thread with some general usage noob questions. I'm looking for a modern way to (learn how to) program the Amiga, and this might be it. I'm currently running SAC/C 6.58 on my A1200 itself, but maybe I can do better than that. So here's a couple of questions:

1. Will I be able to use Visual Studio to build Amiga executables? I mean, including all those nice features like intellisense, 'go to definition' and 'find all references'? I think I read that you can use Eclipse, but I'm not sure wether this is under Windows or under Cygwin.
2. Will I be able to build this project: http://eab.abime.net/showthread.php?t=78295
3. Why are there (almost) no binary distributions for this toolchain?

Anyway, this has been a very interesting read, even though I probably only understood about 20% of what has been said..
Thank you and keep it up, bebbo!
guy lateur is offline  
Old 08 June 2017, 19:24   #303
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by guy lateur View Post
Sorry to barge into this amazing thread with some general usage noob questions. I'm looking for a modern way to (learn how to) program the Amiga, and this might be it. I'm currently running SAC/C 6.58 on my A1200 itself, but maybe I can do better than that. So here's a couple of questions:

1. Will I be able to use Visual Studio to build Amiga executables? I mean, including all those nice features like intellisense, 'go to definition' and 'find all references'? I think I read that you can use Eclipse, but I'm not sure wether this is under Windows or under Cygwin.
2. Will I be able to build this project: http://eab.abime.net/showthread.php?t=78295
3. Why are there (almost) no binary distributions for this toolchain?

Anyway, this has been a very interesting read, even though I probably only understood about 20% of what has been said..
Thank you and keep it up, bebbo!
1. Not sure, but I use code::blocks together with this toolchain just fine.
2. No clue, go ahead and try.
3. It's heavily under development with tweaks and fixes almost every week. Keeping up with the development and doing binary distributions for each OS would be tedious. Building the toolchain yourself is not that hard since the scripts does it all for you basically.
Marlon_ is offline  
Old 08 June 2017, 19:29   #304
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by Marlon_ View Post
1. Not sure, but I use code::blocks together with this toolchain just fine.
2. No clue, go ahead and try.
3. It's heavily under development with tweaks and fixes almost every week. Keeping up with the development and doing binary distributions for each OS would be tedious. Building the toolchain yourself is not that hard since the scripts does it all for you basically.
Thanks for the input, Marlon_!
1. Under windows? I mean, can windows even read the cygwin files (and/or vice versa)?
2. I might just do that!
3. Ok, I see.
guy lateur is offline  
Old 08 June 2017, 19:31   #305
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by guy lateur View Post
Thanks for the input, Marlon_!
1. Under windows? I mean, can windows even read the cygwin files (and/or vice versa)?
2. I might just do that!
3. Ok, I see.
It works for me in MacOS and Linux. Haven't tried on Windows myself. It was ages ago I tried cygwin, so I'm not sure how that works. Perhaps someone else can shed some light on that.
Marlon_ is offline  
Old 08 June 2017, 19:37   #306
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by Marlon_ View Post
It works for me in MacOS and Linux. Haven't tried on Windows myself. It was ages ago I tried cygwin, so I'm not sure how that works. Perhaps someone else can shed some light on that.
No doubt about that!
Using win7-64bit, btw..
guy lateur is offline  
Old 08 June 2017, 19:53   #307
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by guy lateur View Post
Sorry to barge into this amazing thread with some general usage noob questions. I'm looking for a modern way to (learn how to) program the Amiga, and this might be it. I'm currently running SAC/C 6.58 on my A1200 itself, but maybe I can do better than that. So here's a couple of questions:

1. Will I be able to use Visual Studio to build Amiga executables? I mean, including all those nice features like intellisense, 'go to definition' and 'find all references'? I think I read that you can use Eclipse, but I'm not sure wether this is under Windows or under Cygwin.
2. Will I be able to build this project: http://eab.abime.net/showthread.php?t=78295
3. Why are there (almost) no binary distributions for this toolchain?

Anyway, this has been a very interesting read, even though I probably only understood about 20% of what has been said..
Thank you and keep it up, bebbo!
@1. Visual Studio won't work out of the box. Eclipse is doing fine and provides all that nice stuff you want - plus it's working with Windows, Linux or OSX. Running Eclipse with Windows requires the amigaos-toolchain compiled with Cygwin (I 'm using the 32 bit Cygwin, but 64 bit is also ok). Thanks to my changes the include and library paths are autodetected with Windows/Eclipse/Cygwin, so its quite smooth.

@2. The project does not compile out of the box due to some unknown keywords like 'far'. But that should be fixable - maybe the 'chip' attribute requires some effort - or start "nofastmem" on your Amiga ;-)

@3. The reason for not many prebuild binaries (there are some...) and no Windows Installer to install it somewhere is the pita also known as gcc. gcc requires a fixed path to be installed in, which is defined during compile time.
bebbo is offline  
Old 08 June 2017, 20:11   #308
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by bebbo View Post
@1. Visual Studio won't work out of the box. Eclipse is doing fine and provides all that nice stuff you want - plus it's working with Windows, Linux or OSX. Running Eclipse with Windows requires the amigaos-toolchain compiled with Cygwin (I 'm using the 32 bit Cygwin, but 64 bit is also ok). Thanks to my changes the include and library paths are autodetected with Windows/Eclipse/Cygwin, so its quite smooth.

@2. The project does not compile out of the box due to some unknown keywords like 'far'. But that should be fixable - maybe the 'chip' attribute requires some effort - or start "nofastmem" on your Amiga ;-)

@3. The reason for not many prebuild binaries (there are some...) and no Windows Installer to install it somewhere is the pita also known as gcc. gcc requires a fixed path to be installed in, which is defined during compile time.
Thanks for your answer, bebbo, much appreciated!

1. Well, using Visual Studio was my best case scenario, but I'd be very happy to get this going with Eclipse, too. I've used Eclipse in the past, when doing some python dev, although it's been about 10 years. So I'll be going with Cygwin-64, I guess, because why not, right?
2. Well this definitely will be the first thing I'll try to get compiled if I get this toolchain working.
3. Oh, it's even worse than I thought, then.. No worries, though, I'll surely be able to compile this myself..
guy lateur is offline  
Old 08 June 2017, 21:31   #309
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
So I installed Cygwin-64 and tried to build this. It seems to give an error when I do the 2nd step of "how to build" in the readme, ie "./toolchain-m68k --prefix=/opt/m68k-amigaos build". I've tried doing it again, with the same result. Here's what it says at the end:

Code:
INFO: configuring "m4-1.4.17"
DEBUG: makedir ".build-m68k/build/m4-1.4.17"
DEBUG: enter directory ".build-m68k/build/m4-1.4.17"
DEBUG: execute "/home/Guy Lateur/amigaos-cross-toolchain/.build-m68k/sources/m4-1.4.17/configure --prefix=/home/Guy Lateur/amigaos-cross-toolchain/.build-m68k/host"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe srcdir value: '/home/Guy Lateur/amigaos-cross-toolchain/.build-m68k/sources/m4-1.4.17'
ERROR: command "/home/Guy Lateur/amigaos-cross-toolchain/.build-m68k/sources/m4-1.4.17/configure --prefix=/home/Guy Lateur/amigaos-cross-toolchain/.build-m68k/host" failed with 1

Guy Lateur@guy-thuisbak ~/amigaos-cross-toolchain
$
Is that bad? How do I continue? I don't see any other errors in the log. Is it because of the space in the subdir 'Guy Lateur'?
guy lateur is offline  
Old 08 June 2017, 21:47   #310
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
yes, use a path without spaces
bebbo is offline  
Old 08 June 2017, 21:51   #311
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by bebbo View Post
yes, use a path without spaces
That path comes with my windows user name. So do I need to make (and log in as) a different user (I'd rather not), or can I redirect this somehow?
guy lateur is offline  
Old 08 June 2017, 21:58   #312
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by guy lateur View Post
That path comes with my windows user name. So do I need to make (and log in as) a different user (I'd rather not), or can I redirect this somehow?
You may pick any path you like if that path is writeable to you.

Why not create a folder somewhere? Or move the amigaos-toolchain folder to c:\ ?
bebbo is offline  
Old 08 June 2017, 22:37   #313
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by bebbo View Post
You may pick any path you like if that path is writeable to you.

Why not create a folder somewhere? Or move the amigaos-toolchain folder to c:\ ?
Made a folder /home/guy, trying again..
guy lateur is offline  
Old 08 June 2017, 23:08   #314
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Now I get this:

Code:
gawkmisc.o: In function `cygwin_premain2':
/home/guy/amigaos-cross-toolchain/.build-m68k/sources/gawk-3.1.8/posix/gawkmisc.c:246: undefined reference to `setmode'
/home/guy/amigaos-cross-toolchain/.build-m68k/sources/gawk-3.1.8/posix/gawkmisc.c:246:(.text+0x37e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setmode'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:491: gawk.exe] Error 1
make[2]: Leaving directory '/home/guy/amigaos-cross-toolchain/.build-m68k/build/gawk-3.1.8'
make[1]: *** [Makefile:550: all-recursive] Error 1
make[1]: Leaving directory '/home/guy/amigaos-cross-toolchain/.build-m68k/build/gawk-3.1.8'
make: *** [Makefile:397: all] Error 2
ERROR: command "make -j1" failed with 2

Guy Lateur@guy-thuisbak /home/guy/amigaos-cross-toolchain
$
Bad?
guy lateur is offline  
Old 08 June 2017, 23:15   #315
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by guy lateur View Post
Now I get this:

Code:
gawkmisc.o: In function `cygwin_premain2':
/home/guy/amigaos-cross-toolchain/.build-m68k/sources/gawk-3.1.8/posix/gawkmisc.c:246: undefined reference to `setmode'
/home/guy/amigaos-cross-toolchain/.build-m68k/sources/gawk-3.1.8/posix/gawkmisc.c:246:(.text+0x37e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `setmode'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:491: gawk.exe] Error 1
make[2]: Leaving directory '/home/guy/amigaos-cross-toolchain/.build-m68k/build/gawk-3.1.8'
make[1]: *** [Makefile:550: all-recursive] Error 1
make[1]: Leaving directory '/home/guy/amigaos-cross-toolchain/.build-m68k/build/gawk-3.1.8'
make: *** [Makefile:397: all] Error 2
ERROR: command "make -j1" failed with 2

Guy Lateur@guy-thuisbak /home/guy/amigaos-cross-toolchain
$
Bad?
Did you install all required packages?
bebbo is offline  
Old 08 June 2017, 23:33   #316
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Well I did this, if that's what you mean:

Code:
apt-cyg install gcc-core gcc-g++ python git perl-Pod-Simple gperf patch automake make makedepend bison flex libncurses-devel python-devel gettext-devel libgmp-devel libmpc-devel libmpfr-devel
Didn't seem to give any errors, AFAIK..
guy lateur is offline  
Old 08 June 2017, 23:54   #317
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Good. So we know now: Cygwin 64 bit is not ok.

Use Cygwin 32 bit then rinse and repeat.

EDIT:

or edit the file
Code:
/cygdrive/..../amigaos-cross-toolchain/.build-m68k/sources/gawk-3.1.8/posix/gawkmisc.c
and insert at the top

Code:
#include <io.h>

EDIT2:

use the 32bit version - there will be further problem's with cygwin 64 bit

Last edited by bebbo; 08 June 2017 at 23:59.
bebbo is offline  
Old 09 June 2017, 00:25   #318
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Hmm, can't seem to remove cyg64 nor install cyg32 (latter one has troubles with my avg virus scanner). I should probably try again later, like this weekend..

Thanks for all the help, peeps!
I'll let y'all know how this goes..
guy lateur is offline  
Old 09 June 2017, 10:01   #319
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Cygwin/64bit is working now. Just pull the latest changes.
bebbo is offline  
Old 09 June 2017, 11:38   #320
guy lateur
Registered User
 
guy lateur's Avatar
 
Join Date: May 2017
Location: Belgium
Age: 50
Posts: 334
Quote:
Originally Posted by bebbo View Post
Cygwin/64bit is working now. Just pull the latest changes.
Sounds great, I'll test it out as soon as I have some time!
guy lateur is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New GCC based dev toolchain for AmigaOS 3.x cla Coders. Releases 8 24 December 2017 10:18
Issue with photon/xxxx WinUAE Toolchain arpz Coders. Asm / Hardware 2 26 September 2015 22:33
New 68k gcc toolchain arti Coders. C/C++ 17 31 July 2015 03:59
Hannibal's WinUAE Demo Toolchain 5 Bobic Amiga scene 1 23 July 2015 21:04
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 14:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:43.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.15252 seconds with 14 queries