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

Compilation concerns #295

Open
nosleduc opened this issue Jan 21, 2025 · 3 comments
Open

Compilation concerns #295

nosleduc opened this issue Jan 21, 2025 · 3 comments

Comments

@nosleduc
Copy link

Hi

In the CMakeLists.txt in libPng you have

if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64" OR ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
target_compile_definitions(LibPng PRIVATE
PNG_ARM_NEON_OPT=0
)
endif()

  1. It seems that you are checking if the host processor is an arm processor and if yes you are disabling the neon feature ?
  2. If you are compiling with an intel processor, you get an error, so the definition should be in the else statement
  3. Should the check be on the target processor and not the host processor ?
  4. I am not sure this code can properly handle universal build
@galkahana
Copy link
Owner

  1. there's a comment one line earlier linking to an issue. maybe it's resolved by now
  2. donnow. depends if you are getting the same error i got when compiled on arm. maybe it's something different. been a while since i compiled with intel. CI builds universal and seems to work
  3. not sure. depends what you are looking to do. if using the target processor works better for you, i recommend you change the code.
  4. see 2.

@nosleduc
Copy link
Author

Compiling universal on arm processor is not an issue. But universal on intel platform is an issue because it will link with neon.
It comes from the wrong test

@galkahana
Copy link
Owner

Ok, now i see. Ill find me an intel mac to create the right setup. Had an old macbook air but gave it to my cousin a few years back and fairly sure she lost it. Reckon your suggestions make sense. Not sure about universal too. will try my best.

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