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] Bump vendored harfbuzz from 2.9.1 (August 2021) to 8.1.1 (August 2023) #306

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Sep 7, 2023

Looks like libtool received an update since the previous time the autotools build system was regenerated.

@madebr
Copy link
Contributor Author

madebr commented Sep 7, 2023

CI fails because libtool refuses to build a shared SDL2_ttf.dll on mingw:

/bin/sh ./libtool  --tag=CXX   --mode=link g++  -g -O2 -Wall -static-libgcc -static-libstdc++ -Wno-unused-result -fno-rtti -fno-exceptions -fno-threadsafe-statics  -Wl,--no-undefined -o libSDL2_ttf.la -no-undefined -release 2.0 -version-info 2100:0:2100 -Wl,version.o -rpath /d/a/SDL_ttf/SDL_ttf/prefix_autotools/lib libSDL2_ttf_la-SDL_ttf.lo external/freetype/src/autofit/libSDL2_ttf_la-autofit.lo external/freetype/src/base/libSDL2_ttf_la-ftbase.lo external/freetype/src/base/libSDL2_ttf_la-ftbbox.lo external/freetype/src/base/libSDL2_ttf_la-ftbdf.lo external/freetype/src/base/libSDL2_ttf_la-ftbitmap.lo external/freetype/src/base/libSDL2_ttf_la-ftcid.lo external/freetype/src/base/libSDL2_ttf_la-ftdebug.lo external/freetype/src/base/libSDL2_ttf_la-ftfstype.lo external/freetype/src/base/libSDL2_ttf_la-ftgasp.lo external/freetype/src/base/libSDL2_ttf_la-ftglyph.lo external/freetype/src/base/libSDL2_ttf_la-ftgxval.lo external/freetype/src/base/libSDL2_ttf_la-ftinit.lo external/freetype/src/base/libSDL2_ttf_la-ftmm.lo external/freetype/src/base/libSDL2_ttf_la-ftotval.lo external/freetype/src/base/libSDL2_ttf_la-ftpatent.lo external/freetype/src/base/libSDL2_ttf_la-ftpfr.lo external/freetype/src/base/libSDL2_ttf_la-ftstroke.lo external/freetype/src/base/libSDL2_ttf_la-ftsynth.lo external/freetype/src/base/libSDL2_ttf_la-ftsystem.lo external/freetype/src/base/libSDL2_ttf_la-fttype1.lo external/freetype/src/base/libSDL2_ttf_la-ftwinfnt.lo external/freetype/src/bdf/libSDL2_ttf_la-bdf.lo external/freetype/src/bzip2/libSDL2_ttf_la-ftbzip2.lo external/freetype/src/cache/libSDL2_ttf_la-ftcache.lo external/freetype/src/cff/libSDL2_ttf_la-cff.lo external/freetype/src/cid/libSDL2_ttf_la-type1cid.lo external/freetype/src/gzip/libSDL2_ttf_la-ftgzip.lo external/freetype/src/lzw/libSDL2_ttf_la-ftlzw.lo external/freetype/src/pcf/libSDL2_ttf_la-pcf.lo external/freetype/src/pfr/libSDL2_ttf_la-pfr.lo external/freetype/src/psaux/libSDL2_ttf_la-psaux.lo external/freetype/src/pshinter/libSDL2_ttf_la-pshinter.lo external/freetype/src/psnames/libSDL2_ttf_la-psmodule.lo external/freetype/src/raster/libSDL2_ttf_la-raster.lo external/freetype/src/sdf/libSDL2_ttf_la-sdf.lo external/freetype/src/sfnt/libSDL2_ttf_la-sfnt.lo external/freetype/src/smooth/libSDL2_ttf_la-smooth.lo external/freetype/src/svg/libSDL2_ttf_la-svg.lo external/freetype/src/truetype/libSDL2_ttf_la-truetype.lo external/freetype/src/type1/libSDL2_ttf_la-type1.lo external/freetype/src/type42/libSDL2_ttf_la-type42.lo external/freetype/src/winfonts/libSDL2_ttf_la-winfnt.lo external/harfbuzz/src/libSDL2_ttf_la-hb-aat-layout.lo external/harfbuzz/src/libSDL2_ttf_la-hb-aat-map.lo external/harfbuzz/src/libSDL2_ttf_la-hb-blob.lo external/harfbuzz/src/libSDL2_ttf_la-hb-buffer-serialize.lo external/harfbuzz/src/libSDL2_ttf_la-hb-buffer-verify.lo external/harfbuzz/src/libSDL2_ttf_la-hb-buffer.lo external/harfbuzz/src/libSDL2_ttf_la-hb-common.lo external/harfbuzz/src/libSDL2_ttf_la-hb-draw.lo external/harfbuzz/src/libSDL2_ttf_la-hb-face.lo external/harfbuzz/src/libSDL2_ttf_la-hb-fallback-shape.lo external/harfbuzz/src/libSDL2_ttf_la-hb-font.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ft.lo external/harfbuzz/src/libSDL2_ttf_la-hb-number.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-cff1-table.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-cff2-table.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-color.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-face.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-font.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-layout.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-map.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-math.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-metrics.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-arabic.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-default.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-hangul.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-hebrew.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-indic.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-indic-table.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-khmer.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-myanmar.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-syllabic.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-thai.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-use.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shaper-vowel-constraints.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shape.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shape-fallback.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-shape-normalize.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-tag.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ot-var.lo external/harfbuzz/src/libSDL2_ttf_la-hb-outline.lo external/harfbuzz/src/libSDL2_ttf_la-hb-paint.lo external/harfbuzz/src/libSDL2_ttf_la-hb-paint-extents.lo external/harfbuzz/src/libSDL2_ttf_la-hb-set.lo external/harfbuzz/src/libSDL2_ttf_la-hb-shape-plan.lo external/harfbuzz/src/libSDL2_ttf_la-hb-shape.lo external/harfbuzz/src/libSDL2_ttf_la-hb-shaper.lo external/harfbuzz/src/libSDL2_ttf_la-hb-static.lo external/harfbuzz/src/libSDL2_ttf_la-hb-ucd.lo external/harfbuzz/src/libSDL2_ttf_la-hb-coretext.lo external/harfbuzz/src/libSDL2_ttf_la-hb-gdi.lo external/harfbuzz/src/libSDL2_ttf_la-hb-uniscribe.lo external/harfbuzz/src/libSDL2_ttf_la-hb-unicode.lo -lusp10 -lgdi32 -lrpcrt4  -lmingw32 -mwindows -lSDL2main -lSDL2

*** Warning: linker path does not have real file for library -lSDL2main.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libSDL2main and none of the candidates passed a file format test
*** using a file magic. Last file checked: D:/a/_temp/msys64/mingw32/lib/libSDL2main.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.

@sezero Did I screw something up?

@sezero
Copy link
Contributor

sezero commented Sep 7, 2023

libtool have issues with windows, e.g.:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52253

That's why SDL satellite libraries uses an old version of libtool
so that their example programs can link. (SDL2 itself uses latest
safely because its test programs don't go through libtoolization)

(FYI: The issue was originally noticed / discussed here where I had
to downgrade libtool in satellite libs: libsdl-org/SDL#5040)

For the issue here: Redo everything from start, but later do not
call autoreconf to regenerate: run the included autogen.sh script
instead, and all should be fine.. (The included libtool is patched
for proper functionality and is enough for SDL-supported systems)

@madebr
Copy link
Contributor Author

madebr commented Sep 7, 2023

I don't get the sincosf usage
I am careful to not support it in config.h of harfbuzz: https://github.com/libsdl-org/harfbuzz/blob/ecac8bc7efd6266f63ed114c36a69ae8e1d4a4d3/config_sdl_unix.h#L95-L96

@sezero
Copy link
Contributor

sezero commented Sep 7, 2023

I don't get the sincosf usage

gcc usually optimizes sin and cos into a sincos, at least for x86/x64

Looks at least with this you will need linking with -lm on unix (mac
and windows should not be affected.)

@madebr madebr force-pushed the bump-harfbuzz-sdl2 branch 2 times, most recently from 9d59f97 to 71ef1b3 Compare September 7, 2023 21:07
configure.ac Outdated Show resolved Hide resolved
@madebr madebr force-pushed the bump-harfbuzz-sdl2 branch 2 times, most recently from 595e015 to d6dada2 Compare September 7, 2023 21:48
@madebr
Copy link
Contributor Author

madebr commented Sep 7, 2023

I bumped it to 8.1.1

@madebr madebr changed the title [SDL2] Bump vendored harfbuzz from 2.9.1 (August 2021) to 8.0.1 (September 2023) [SDL2] Bump vendored harfbuzz from 2.9.1 (August 2021) to 8.1.1 (August 2023) Sep 7, 2023
@madebr
Copy link
Contributor Author

madebr commented Sep 7, 2023

As a sidenote, I didn't test the Android.mk of harfbuzz.

@madebr madebr merged commit 5bba532 into libsdl-org:SDL2 Sep 7, 2023
8 checks passed
@madebr madebr deleted the bump-harfbuzz-sdl2 branch September 7, 2023 22:26
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

Successfully merging this pull request may close these issues.

2 participants