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

Update PDFWriter to 4.6.7 #411

Merged
merged 25 commits into from
Oct 3, 2024
Merged

Conversation

julianhille
Copy link
Owner

@julianhille
Copy link
Owner Author

@galkahana any ideas what am i doing wrong?

@galkahana
Copy link
Contributor

If im reading the error messages right then it seems like theres a conflict in linking the freetype dll. Both freetype and zlib define flate/inflate method. This probably has to do with the addition of zlib as dependency without the removal of the gzip code (im seeing only in this pr and not in either earlier code or other similar sources - hummusjs or pdfwriter). I think you have to choose one or another. Id like to form a verified response but on vacation. Be back home in a week and i can run some checks.

@julianhille
Copy link
Owner Author

ok i thought its possible through the new system that the freetype lib chooses hummus:zlib which uses zlib lib. but couldnt get it to work. also Z_PREFIX had no effect (i may have needed to unset it from zlib to not have the same prefix)

@julianhille
Copy link
Owner Author

libtiff has an issue here with: https://gitlab.com/libtiff/libtiff/-/issues/622

@galkahana
Copy link
Contributor

You should be able to correct this problem by adding a define symbol FT_CONFIG_OPTION_SYSTEM_ZLIB=1 to src/deps/FreeType/binding.gyp.
seems like whatever in freetype that should isolate the gzip implementation symbols from the rest of the world isn't 100% in all scenarios.
you can then drop the added dependencies.

like here:
https://github.com/galkahana/MuhammaraJS/blob/feature/410-update-pdfwriter/src/deps/FreeType/binding.gyp

this should make the builds work, but i think that due to a recent upgrade of the internal tiff library - galkahana/PDF-Writer#227 - 32 bit is sort of not supported anymore...at least for tiff images, and so it might mean that ia32 archs will fail testing (that is...probably). maybe remove them? if makes sense.

@galkahana
Copy link
Contributor

ok, might be i have a solution for the tests failing on tiff.
ill update,

@julianhille
Copy link
Owner Author

Awesome

@galkahana
Copy link
Contributor

ok. seems to build and run well. solution to tiff is to allow defining libtiff SIZEOF_SIZE_T as 4 for target_arch ia32.

this combines allowing the override of the symbol in tif_config.h, like here and adding a conditional symbol with the right value (4) for target arch 32 in the respective binding.gyp,

@julianhille
Copy link
Owner Author

@galkahana any ideas why tiff Tests failing for musl and electron or why one encrypt Stream Test fails?

@galkahana
Copy link
Contributor

oh my. well i guess there's some tiff flags to tune for those failing builds [if we're lucky it's the same issue, less lucky...several]. it's not the same as what i corrected with the 32 bits in that only one of the tests failed then and only on particular tiffs that had a particular compression...but it's probably along those lines of this and that count of bytes per some type. i'll have to sit and figure this out.
also about the filter. :(.

i'll try to find some time this weekend.

@galkahana
Copy link
Contributor

ok, figured out the tiff issues part.
binding.gyp for tiff got 2 defines sections. naturally the latter overrides the former hiding the much needed ZIP_SUPPORT=1 flag.
removing the latter segment resolves the issue.
got PR for this:
#425

[i mean...still to run the workflows but im fairly optimistic]

@galkahana
Copy link
Contributor

seems like the builds completed well:
https://github.com/galkahana/MuhammaraJS/actions/runs/11165565702
hope this mean we're good :)

@julianhille julianhille merged commit d7a26fc into develop Oct 3, 2024
79 of 285 checks passed
@julianhille julianhille deleted the feature/410-update-pdfwriter branch October 3, 2024 20:20
@julianhille julianhille restored the feature/410-update-pdfwriter branch October 3, 2024 20:25
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.

update pdf writer base lib
2 participants