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

Fails to build on musl based distributions #17511

Closed
2 tasks done
markand opened this issue Feb 3, 2025 · 1 comment
Closed
2 tasks done

Fails to build on musl based distributions #17511

markand opened this issue Feb 3, 2025 · 1 comment

Comments

@markand
Copy link
Contributor

markand commented Feb 3, 2025

Is there an existing issue for this?

  • This is a bug in RetroArch frontend
  • I have searched the existing issues

Description

Hi,

It looks like 1.20.0 assumes that pthread_t is an integer which is defined as an opaque type per POSIX specifications. Thus it fails to build on musl:

CC tasks/task_file_transfer.c
input/common/linux_common.c: In function 'linux_close_illuminance_sensor':
input/common/linux_common.c:265:26: error: initialization of 'pthread_t' {aka 'struct __pthread *'} from 'uintptr_t' {aka 'unsigned int'} makes pointer from integer without a cast [-Wint-conversion]
  265 |       pthread_t thread = sthread_get_thread_id(sensor->thread);
      |                          ^~~~~~~~~~~~~~~~~~~~~
CC tasks/task_image.c
make: *** [Makefile:209: obj-unix/release/input/common/linux_common.o] Error 1
make: *** Waiting for unfinished jobs....
input/drivers/linuxraw_input.c: In function 'linuxraw_input_state':
input/drivers/linuxraw_input.c:123:14: warning: the comparison will always evaluate as 'true' for the pointer operand in 'binds + (sizetype)(port * 3560)' must not be NULL [-Waddress]
  123 |          if (binds[port])
      |              ^~~~~
>>> ERROR: retroarch: build failed

I'll address a pull request to fix the issue later on (unless someone does it faster).

Expected behavior

No response

Steps to reproduce the bug

  1. Build on any musl linux distribution

Version/Commit

1.20.0

Bisect Results

No response

Present in the nightly version

I don't know

Platform & operating system

alpine linux 3.21.0

Affected Cores

No response

Environment information

No response

Relevant log output

@markand
Copy link
Contributor Author

markand commented Feb 5, 2025

Fixed with #17512

@markand markand closed this as completed Feb 5, 2025
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

1 participant