Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2 build fails for Mac/Linux in Github #302

Closed
Bill-Gray opened this issue Oct 2, 2023 · 3 comments
Closed

SDL2 build fails for Mac/Linux in Github #302

Bill-Gray opened this issue Oct 2, 2023 · 3 comments

Comments

@Bill-Gray
Copy link
Owner

(Was issue wmcbrine/155) Quoting @pavkam from that issue :


Not entirely sure what is causing it:

Example of failed build:
https://github.com/pavkam/sharpie/actions/runs/6369436403/job/17289688889

Makefile:60: *** Recursive variable 'CC' references itself (eventually).  Stop.

It works for other platforms (arm + win).

The build steps I use are here:
https://github.com/pavkam/sharpie/blob/main/.github/workflows/pd-curses-mod-build-and-pack.yml#L101

@Bill-Gray
Copy link
Owner Author

Sorry, I thought I 'd posted a possible fix here immediately after moving the issue!

The error message is accurate. By default, $(CC) is defined in terms of $(PREFIX), which in turn is defined in terms of $(CC). That's recursive, all right.

On ARM and Windows, $(PREFIX) is not defined using $(CC), so there's no recursion.

It seems to me that all we need to do is to remove from sdl2/Makefile the line

PREFIX = $(shell $(CC) -dumpmachine)

and add in

ifdef _w32
   PREFIX=i686-w64-mingw32
   E = .exe
endif

The line we'd be removing was added by @okibcn, and I'm not entirely sure why it's there... @okibcn, any comment?

@GitMensch
Copy link
Collaborator

GitMensch commented Oct 4, 2023 via email

Bill-Gray added a commit that referenced this issue Oct 11, 2023
…. Also revised the GL Makefile to resemble the SDL2 one a little more closely. Still some work to be done there...
@Bill-Gray
Copy link
Owner Author

Note that this is a duplicate of #296. I think this is now fixed, and am closing both issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants