Skip to content

+poppler.freedesktop.org#432

Merged
mxcl merged 4 commits into
pkgxdev:mainfrom
jonchang:poppler
Mar 5, 2023
Merged

+poppler.freedesktop.org#432
mxcl merged 4 commits into
pkgxdev:mainfrom
jonchang:poppler

Conversation

@jonchang
Copy link
Copy Markdown
Contributor

also add the poppler-data package separately. (Namespacing is great!)

@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented Feb 28, 2023

  • Added a new project poppler.freedesktop.org/poppler-data
  • Updated the package file for poppler to include this dependency and also added some other dependencies that were missing from it's original package file (libjpeg, libpng)
  • Also updated the build script of popper to install static libraries as well in addition to shared ones so we can link against them later on when building our own projects with gxpkgs toolchain installed locally or via docker image built using these packages files

@jonchang
Copy link
Copy Markdown
Contributor Author

jonchang commented Feb 28, 2023

Looks like we will need to package libopenjpeg and libtiff done

mxcl added a commit that referenced this pull request Mar 1, 2023
@mxcl mxcl mentioned this pull request Mar 1, 2023
mxcl added a commit that referenced this pull request Mar 1, 2023
@mxcl
Copy link
Copy Markdown
Contributor

mxcl commented Mar 1, 2023

Added:

@jonchang
Copy link
Copy Markdown
Contributor Author

jonchang commented Mar 3, 2023

Odd failure on darwin/x86-64.

g-ir-scanner: link: gcc -o /opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/tmp-introspectimjfx6ue/Poppler-0.18 /opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/tmp-introspectimjfx6ue/Poppler-0.18.o -L. -Wl,-rpath,. -L/opt/poppler.freedesktop.org/src-v22.12.0/build_shared -Wl,-rpath,/opt/poppler.freedesktop.org/src-v22.12.0/build_shared -L/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib -Wl,-rpath,/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib -lpoppler-glib -lpoppler -L/opt/gnome.org/glib/v2.72.4/lib/pkgconfig/../../lib -L/opt/gnome.org/glib/v2.72.4/lib/pkgconfig/../../../../../gnu.org/gettext/v0/lib -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -Wl,-rpath,/opt
dyld[49133]: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib
  Referenced from: <CF326A57-9BEF-336D-BC3B-029D12F45C90> /opt/cairographics.org/v1.16.0/lib/libcairo.2.dylib
  Reason: tried: '/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/usr/local/opt/freetype/lib/libfreetype.6.dylib' (no such file), '/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/libfreetype.6.dylib' (no such file), '/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/libfreetype.6.dylib' (no such file)
Command '['/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/tmp-introspectimjfx6ue/Poppler-0.18', '--introspect-dump=/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/tmp-introspectimjfx6ue/functions.txt,/opt/poppler.freedesktop.org/src-v22.12.0/build_shared/glib/tmp-introspectimjfx6ue/dump.xml']' died with <Signals.SIGABRT: 6>.

On darwin/aarch64:

% otool -L libcairo.2.dylib
libcairo.2.dylib:
	@rpath/cairographics.org/v1.16.0/lib/libcairo.2.dylib (compatibility version 11603.0.0, current version 11603.0.0)
	@rpath/pixman.org/v0/lib/libpixman-1.0.40.0.dylib (compatibility version 41.0.0, current version 41.0.0)
	@rpath/freedesktop.org/fontconfig/v2/lib/libfontconfig.1.dylib (compatibility version 14.0.0, current version 14.0.0)
	@rpath/freetype.org/v2/lib/libfreetype.6.18.3.dylib (compatibility version 6.0.0, current version 6.18.3)
	@rpath/libpng.org/v1/lib/libpng16.16.dylib (compatibility version 56.0.0, current version 56.0.0)
	@rpath/zlib.net/v1/lib/libz.1.2.13.dylib (compatibility version 1.0.0, current version 1.2.13)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 61.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0)
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1690.3.3)

But on darwin/x86-64:

% otool -L libcairo.dylib
libcairo.dylib:
	@rpath/cairographics.org/v1.16.0/lib/libcairo.2.dylib (compatibility version 11603.0.0, current version 11603.0.0)
	@rpath/pixman.org/v0/lib/libpixman-1.0.40.0.dylib (compatibility version 41.0.0, current version 41.0.0)
	@rpath/libpng.org/v1/lib/libpng16.16.dylib (compatibility version 56.0.0, current version 56.0.0)
	/usr/local/opt/freetype/lib/libfreetype.6.dylib (compatibility version 25.0.0, current version 25.3.0)
	@rpath/zlib.net/v1/lib/libz.1.2.13.dylib (compatibility version 1.0.0, current version 1.2.13)
	/usr/local/opt/libxrender/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
	/usr/local/opt/libx11/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/usr/local/opt/libxext/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 56.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1856.105.0)
	/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1557.3.2)

The build for intel macs seems to reference libraries that shouldn't exist.

@jonchang
Copy link
Copy Markdown
Contributor Author

jonchang commented Mar 3, 2023

@jhheider any chance you could kick off a rebuild for intel darwin for cairographics.org? It seems to be picking up Homebrew X11 libraries that it shouldn't be using.

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

Yup.

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

Can confirm those paths aren't present on our self-hosted builder, so that's a consequence of GHA macos-11.

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

Done: https://github.com/teaxyz/pantry.core/actions/runs/4319977717

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

$ otool -l cairographics.org/v1.16.0/lib/libcairo.2.dylib | grep dylib
cairographics.org/v1.16.0/lib/libcairo.2.dylib:
         name @rpath/cairographics.org/v1.16.0/lib/libcairo.2.dylib (offset 24)
         name @rpath/pixman.org/v0/lib/libpixman-1.0.40.0.dylib (offset 24)
         name @rpath/freedesktop.org/fontconfig/v2/lib/libfontconfig.1.dylib (offset 24)
         name @rpath/freetype.org/v2/lib/libfreetype.6.18.3.dylib (offset 24)
         name @rpath/libpng.org/v1/lib/libpng16.16.dylib (offset 24)
         name @rpath/zlib.net/v1/lib/libz.1.2.13.dylib (offset 24)
         name /usr/lib/libSystem.B.dylib (offset 24)

@jonchang
Copy link
Copy Markdown
Contributor Author

jonchang commented Mar 3, 2023

Tested the linux/x86-64 artifacts locally, it looks like there's an issue with relocation. Going to see what I can find out about what patchelf is doing (or not doing)

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

We've been developing more issues recently. For many things, using PIE will fix it, but not for all things. Your expertise in the depths of binary formats is sorely appreciated.

@jonchang
Copy link
Copy Markdown
Contributor Author

jonchang commented Mar 3, 2023

I note that we're using patchelf 1.17.0 still, but .2 released a little while ago and has a few fixes for out of bounds segment references.

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 3, 2023

Triggering the build.

@jhheider
Copy link
Copy Markdown
Contributor

jhheider commented Mar 5, 2023

Yeah, confirmed that it's definitely PIE.

curl.se: '*'
freedesktop.org/fontconfig: '>=2.13'
freetype.org: '>=2.10'
gnome.org/glib: '>=2.64'
Copy link
Copy Markdown
Contributor

@mxcl mxcl Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ^2.64 is more likely. Using >= includes a potential future v3. Same for the rest.

libjpeg-turbo.org: '*'
libpng.org: '*'
openjpeg.org: '*'
poppler.freedesktop.org/poppler-data: '*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have preferred poppler.freedesktop.org/data but the beauty of namespacing is this is contained so not important.

Copy link
Copy Markdown
Contributor

@mxcl mxcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Biggest dep tree so far! Great work.

@mxcl mxcl merged commit e70d0dd into pkgxdev:main Mar 5, 2023
This was referenced Mar 7, 2023
@jhheider jhheider mentioned this pull request Apr 1, 2023
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.

3 participants