AROS World Exec
Development => AROS Software Development => Topic started by: leeg on February 25, 2020, 07:18:43 AM
-
Hi,
I've got a program that I know builds and runs if I compile it in AROS using gcc directly, and I'm trying to set it up for building in-tree. To save describing too much, the project is here: https://github.com/iamleeg/Amiga-Smalltalk
I took the 'local-helloworld' example from https://aros.sourceforge.io/documentation/developers/app-dev/introduction.php and edited it to build the source files in my project. What I see is that if I make this project within the AROS tree, I get a binary in bin/linux-x86_64/AROS/local/AmigaSmallTalk/AmigaSmalltalkTests, but that binary cannot be run in AROS. `file` tells me it is a:
ELF 64-bit LSB relocatable, x86-64, version 1 (AROS Research Operating System), not stripped
and nm tells me that all of the symbols from my source files are there. However if I launch the program from the AROS shell, it says "file is not executable". I have tried using protect +e, but that doesn't change the outcome. How can I diagnose this?
-
"OT" I forgot there is this script for linux that configures the whole cross environment for you
http://archives.aros-exec.org/share/development/cross/gimmearos.zip
-
I use ubuntu 14.04 (32bit) to compile, but I don't know about programming, currently the compilations have been successful but I refer to the scripts that write the dev
-
Thanks, I'm using Ubuntu 18.04 (64-bit), and building hosted x86-64 AROS binaries.
-
I should make it clear that when I followed the local-HelloWorld example, that worked fine, so it's something in my changes (or my sources) that doesn't work.
-
surely
-
hello me when I install some packages and run a build then I clean the system with apt-get clean
-
I realised my problem: I had a global variable that wasn't initialised. It was being linked as an undefined reference (a Common symbol, in nm's lexicon). I don't know why this causes the executable to fail on AROS when it works on other operating systems, but the solution I applied was to make the variable file-scope, so that it doesn't make it to the link editor.
-
I recently compiled the odyssey browser using ready-to-use scripts one of these was used to set up the development environment before dumping the source tree, contrib etc..