Open hpwit opened 3 years ago
Hi @hpwit , I've got the same 2 errors on my Intel (Core i7) Mac. Seems I fixed with some little edits in two files (in 2cdt tool folder). You can try the fixed version that is in my repo and, if it works for your machine too, we can suggest these changes via pull-request. Regards.
Thank you !!! I will try this ASAP Regards
Hi @hpwit and @atzurk
Did you try with CPCtelera 1.5 development branch? Does it work on Mac OSX M1?
As I don't have an M1 to test, it is quite interesting if you can tell me how it goes and how to fix potential problems for M1 and M2 users.
Thank you :)
Hello I will try and let you know
Hi everyone, In my case, the development branch crashed when started building the tools... it seems that M1 is not fully supported by sdcc v3.6.8-r9946. I've tried using a higher version of sdcc, with the sources of v3.8.0 the setup processes ran correctly, and the examples were built without errors, and executed with rvm emulator. I've just replaced the src folder in the sdcc directory with the new version, with a copy of the file configure_sdcc_for_z80.sh. My system is an Apple Macbook Pro, with a M1 Max running Ventura OS (13.5.1). In case you need more information or some tests done, just let me know!
Hello @atzurk - now I am again having problems to compile cpctelera on macOS with silicon (although I did manage somehow with using more recent sdcc similar like you did)
Could you please share your source base so I could try to compile?
installing on Mac OS X m1 i have this error [1;31;49m[ToolMaker]^[[1;33;49m Building 2cdt...^[[0;39;49m gcc -O3 -fsigned-char -DUNIX src/2cdt.c -c -o obj/2cdt.o src/2cdt.c:188:19: warning: multiple unsequenced modifications to 'aux' [-Wunsequenced] aux = (aux <<= 1) ^ kCRCpoly; ~ ^ src/2cdt.c:898:35: warning: assigning to 'unsigned char ' from 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] pTapeFilename = optarg; ^ or explicitly provide a declaration for 'toupper'
src/2cdt.c:1268:8: error: implicit declaration of function 'TZX_AppendFile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
TZX_AppendFile(pTZXFile, pDestFilename);
^
6 warnings and 2 errors generated.
make[1]: ** [obj/2cdt.o] Error 1
make: [2cdt] Error 2
~~ src/2cdt.c:1000:25: warning: assigning to 'unsigned char ' from 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] pSourceFilename = argv[optind]; ^~~~~ src/2cdt.c:1001:23: warning: assigning to 'unsigned char ' from 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] pDestFilename = argv[optind+1]; ^~~~~~~ src/2cdt.c:1040:31: warning: passing 'unsigned char ' to parameter of type 'const char ' converts between pointers to integer types with different sign [-Wpointer-sign] if (Host_LoadFile(pSourceFilename, &pData, &DataLength)) ^~~~~~~ src/2cdt.c:99:32: note: passing argument to parameter 'Filename' here BOOL Host_LoadFile(const char *Filename, unsigned char pLocation, unsigned long pLength) ^ src/2cdt.c:1137:42: warning: passing 'unsigned char ' to parameter of type 'const char ' converts between pointers to integer types with different sign [-Wpointer-sign] int nLength = strlen(pTapeFilename); ^~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter '__s' here size_t strlen(const char __s); ^ src/2cdt.c:1142:41: error: implicitly declaring library function 'toupper' with type 'int (int)' [-Werror,-Wimplicit-function-declaration] TapeHeader[i] = toupper(pTapeFilename[i]); ^ src/2cdt.c:1142:41: note: include the header