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

Investigate non-functioning of --with-png=no in freetype builds #3509

Closed
sxa opened this issue Oct 20, 2023 · 10 comments
Closed

Investigate non-functioning of --with-png=no in freetype builds #3509

sxa opened this issue Oct 20, 2023 · 10 comments
Labels
aarch Issues that affect or relate to the aarch ARCHITECTURE arm Issues that affect or relate to the ARM OS macos Issues that affect or relate to the MAC OS

Comments

@sxa
Copy link
Member

sxa commented Oct 20, 2023

What are you trying to do?
Build freetype from source without libpng even when libpng is installed

Expected behaviour:
freetype is built without a dynamic link to libpng

Observed behaviour:
freetype is built with a dynamic link to libpng (Seen on macos jdk8u builds when cross-compiled on an aarch64 build machines)

Any other comments:
This line is in the build process but doesn't seem to take effect:

pngArg="--with-png=no"

It looks like the configure command in the freetype build invokes make which does cd build/make && ./configure when there is no configure script in that directory:

12:51:23  HEAD is now at 86bc8a950 * Version 2.9.1 released. =========================
12:51:23  make: error: couldn't stat Xcode's Info.plist (errno=No such file or directory)
12:51:23  /bin/sh: ./configure: No such file or directory
12:51:23  make: *** [setup] Error 127

(Noting that the build continues regardless, but the parameter to get rid of the libpng support does not take effect)

This problem was introduced via adoptium/infrastructure#2536 (comment) where libpng was explicitly installed in the x64 brew environment on the aarch64 build machines.

Two possible mitigations:

  • Build jdk8u on the x64 machines again
  • Force the detection of libpng to fail by removing the symlinks /usr/local/bin/libpng-config and /usr/local/lib/pkgconfig/libpng.pc (NOTE: This has been done on build-macstadium-macos11-arm64-2 and should be fixed properly after the release - potentially by removing the brew libpng package unless it's required for something else) The removed links are shown below
% ls -ld  /usr/local/bin/libpng-config /usr/local/lib/pkgconfig/libpng.pc
lrwxr-xr-x  1 administrator  admin  41 11 Sep 12:59 /usr/local/bin/libpng-config -> ../Cellar/libpng/1.6.40/bin/libpng-config
lrwxr-xr-x  1 administrator  admin  50 11 Sep 12:59 /usr/local/lib/pkgconfig/libpng.pc -> ../../Cellar/libpng/1.6.40/lib/pkgconfig/libpng.pc
@github-actions github-actions bot added aarch Issues that affect or relate to the aarch ARCHITECTURE arm Issues that affect or relate to the ARM OS macos Issues that affect or relate to the MAC OS labels Oct 20, 2023
@sxa
Copy link
Member Author

sxa commented Oct 23, 2023

Note that https://ci.adoptium.net/computer/build-macstadium-macos11-arm64-2/ is the machine where the two links to libpng were removed.

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Nov 1, 2023

Right now on test-macstadium-macos11-arm64-1 I uninstalled both versions of libpng, arm and x64, and was able to build an x64 mac jdk8 binary. This is likely the way forward; to explicitly uninstall both versions of libpng on our arm mac machines during setup

@sxa
Copy link
Member Author

sxa commented Nov 1, 2023

explicitly uninstall both versions of freetype

Hmmm are you saying that the freetype package from brew pulls in the libpng development stuff? It sounds from the above like you managed to just uninstall libpng on its own so I'm a little unclear as to why you're suggesting removing freeetype for this.

(or did you mean libpng instead of freetype?)

@Haroon-Khel
Copy link
Contributor

Typo, I meant to say uninstall both versions of libpng. Fixed

@Haroon-Khel
Copy link
Contributor

I built https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-mac-x64-temurin/423/artifact/workspace/target/OpenJDK8U-jdk_x64_mac_hotspot_2023-11-02-12-59.tar.gz on build-macstadium-macos11-arm64-1 after uninstalling intel and arm64 libpng.
AQA test pipeline: https://ci.adoptium.net/job/AQA_Test_Pipeline/201/console
The jdk binary was able to launch the tck harness

@sxa
Copy link
Member Author

sxa commented Nov 2, 2023

(Just as a clarification point of note, this issue is specifically related to the fact the option we try to pass in --with-png=no doesnt' work rather than related to fixing the machines to prevent it being installed - that's the scope of adoptium/infrastructure#3231)

@sxa
Copy link
Member Author

sxa commented Nov 6, 2023

If we can resolve this then we can undo the removal of libpng done under adoptium/infrastructure#3185

@Haroon-Khel
Copy link
Contributor

The reason why its failing ./configure --help | grep with-png is because sh autogen.sh needs to run before any ./configure is invoked, instead of at https://github.com/adoptium/temurin-build/blob/698313c1bf2d036c334492a387586e2c0544aa6b/sbin/prepareWorkspace.sh#L492C42-L492C42

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Nov 16, 2023

adoptium/infrastructure#3254 is in to revert changes made in adoptium/infrastructure#3185 which is all that's left to do in this issue

@Haroon-Khel
Copy link
Contributor

adoptium/infrastructure#3254 is merged, this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch Issues that affect or relate to the aarch ARCHITECTURE arm Issues that affect or relate to the ARM OS macos Issues that affect or relate to the MAC OS
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants