Created attachment 201719 [details] mame.patch I'm not sure if this problem occurred for anyone else, but with the system clang, MAME's build system thinks it is running GCC instead of Clang and its genie lua script spits out the incorrect message of "GCC version 5.0 or later needed", as seen here: http://kirby.cyberbotx.com:8765/poudriere/data/local-default/2018-12-24_10h40m30s/logs/errors/mame-0.200_2.log The attached patch fixes this so it correctly sees it as clang. I'm really not sure WHY it doesn't detect it as clang properly, but this fixes it regardless.
(In reply to Naram Qashat from comment #0) Hi Naram, Sorry, but I can't reproduce this. It builds fine for me in {11.2,12.0}{amd64,i386} and 13-current i386. Do you have any specifics settings that can trigger this problem?
(In reply to Fernando Apesteguía from comment #1) Not that I'm aware of. I'm just building in poudriere in a 12-amd64 jail. My options for MAME are set to their defaults. 'clang --version' reports it to be clang 6.0.1, so I really don't know what is going on with my system causing that.
(In reply to Naram Qashat from comment #2) I see in your log you're using ccache. Could you try to disable it and/or clean the cache directory?
(In reply to Fernando Apesteguía from comment #3) Just tried without my patch and without ccache on, same issue for me: http://kirby.cyberbotx.com:8765/poudriere/data/local-default/2019-02-14_20h35m10s/logs/errors/mame-0.200_3.log Still have no idea why it is happening.
(In reply to Naram Qashat from comment #4) Could you try something like this? make clean && make extract the port Modify genie.lua and add print("XXX " .. _OPTIONS["gcc"]); right after the conditional you modify in your patch. Build the port and save the output to out.txt grep XXX out.txt and show the result. This is my ouptput: fernape@hammer:~/FreeBSD-repos/ports/head/emulators/mame$ grep XXX salida XXX freebsd-clang fernape@hammer:~/FreeBSD-repos/ports/head/emulators/mame$ What's yours?
(In reply to Fernando Apesteguía from comment #5) For me I get XXX freebsd Without the -clang part at the end. After a little digging, I notice that my genie command is getting called with --gcc=freebsd, though, which is why _OPTIONS["gcc"] is freebsd instead of freebsd-clang. And freebsd-clang only seems to be added via patches in the port's files directory. Not really sure what is causing it to still pick freebsd instead of freebsd-clang. That is beyond my understanding of MAME's build system.
(In reply 'to Naram Qashat from comment #6) Can you do make clean && make patch ¿Does it show any errors? If not, can you attach ${WRKSRC}/makefile and ${WRKSRC}/scripts/toolchain.lua?
(In reply to Fernando Apesteguía from comment #7) There were no errors in patching. I assume you want to make sure that freebsd-clang is in those two files, and it is: http://www.cyberbotx.com/mame-makefile http://www.cyberbotx.com/mame-toolchain.lua
(In reply to Naram Qashat from comment #8) Yep. Those files are identical to mine :S I don't know what's going on here.
Hi Naram, Unfortunately I think I can't provide further help. Since this PR was opened, nobody in the lists reported the same issue and I can't reproduced it either. Everything seems to indicate that some local issue is going on here. As such, I would like to close this PR.
Closing PR because I was completely unable to reproduce the issue an no user reported similar problems.