AMU - command length limited to 255 characters (and workaround!)
tymaja (278) 178 posts |
As per the title; I am working on something related to the various projects I’ve been doing the last few months (which will include making a test build of RISC OS with C Vdu drivers!); The thing I am working on uses quite a few source files. All in the same ‘c’ and ‘h’ folders, as I can’t figure out how to do subdirectories (and can’t find any C source code that does). The AMU command to build the project is well over 255 bytes. I could work around this by giving very short filenames for the source code. I actually came across this issue when I first started compiling stuff in C, but then it went away, so I thought it was a temporaeh glitch, but it came back just now. The solution : compile a build of RISC OS first. Once that is done, I can then build my own stuff, with my makefile can using the huge (probably 300-400 characters long) list of files in the ‘OBJ’ variable; I can compile as many times as I want, over days, but need to rebuild RISC OS if I reboot the Pi4. Has anyone come across this before, or found workarounds different to the above? I made a cut-down RO rom so can compile it in well under a minute, so it isn’t a major issue :) |
Paolo Fabio Zaino (28) 1893 posts |
Yes, but AFAIR this has been fixed in recent/latest DDE? Which version do you have? Also make sure you have loaded the right DDEUtils (IIRC) I can compile my UltimaVM fine with DDE now, before it gave me the same error, so I assume it has been fixed. |
tymaja (278) 178 posts |
I will check (I am new to all of this. I really wish (I had known of C? I bet Acorn C was expensive from a high school student’s perspective!)). The whole Acorn C system is impressive so far (both in ease of use, especially the Makefiles compared to GCC). But also at the system level – the C Library seems to have a low overhead … from looking at how SWIs etc are processed ‘in silico’ But back on topic – I am using the latest version. However I am using RO 5.29 … I don’t think I have traces of the 3-year older version of the DDE/C tools on this SD card … but I definitely can’t rule it out. Is there an easy way to check (a * command that reports the version? If so, I could issue that * command before and after building RISC OS and see if it changes?) |
David Pitt (9872) 364 posts |
This is from the latest version of the DDE, DDE31e. *cc --version Norcroft RISC OS Arm C vsn 5.93 [07 Sep 2024] Warning: cc command with no effect *Help DDEUtils ==> Help on keyword DDEUtils Module is: DDEUtils 1.75 (12 Jul 2015) DDE versions are listed here. |
Stuart Swales (8827) 1367 posts |
Ensure that you have DDEUtils loaded – it’s this module which allows the C runtime to support command lines longer than the OS does. But also see https://www.riscosopen.org/tracker/tickets/529 so you’ll need an updated SharedCLibrary loaded on RISC OS < 5.30 |
David J. Ruck (33) 1649 posts |
How about reading the compiler commands help rather than rebuilding the OS. The link command has -VIA option to take a list of object files from a file when they are too long for even DDE’s extended command line. |