-
Notifications
You must be signed in to change notification settings - Fork 74
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
[MacOS][Test Runner] build #179
Comments
I think I fixed the problem with macos. Not sure it's the best way, though. The build seems working now 😄 |
Seems to be working with the ucon64 brew package. There seems to be an issues with macos-14 binary object versions :- This will be sorted out with an ICU built for MacOS-14.4. Also it looks like builds for macos-latest and macos-14 are exactly the same ?! |
@lfoppiano Do you know what this is and whether it can just be removed ?
|
I have made a pull request to deal with sprinft buffer overflows. |
I think this needs modifying too, can you double check the logic :-
patch :- |
I modified all the wchar_t's to UChar32's in XmlAltoOutputDev.cc and now it will be compiling correctly for *nix platforms, but possibly or possibly not for Windows platforms ? This allows Ubuntu ARM64 to compile now, but there are linker errors with libs/image/png/linux/64/libpng.a as theres no Ubuntu/ARM64 of libpng avaliable. https://github.com/AaronNGray/pdfalto/actions/runs/13462391056/job/37620573101#step:9:555 |
There is a regression in the Ubuntu-24.04/x64 ICU 77 binaries that were added, otherwise this should build. https://github.com/AaronNGray/pdfalto/actions/runs/13462391056/job/37620572383#step:9:554 |
@lfoppiano Ideally we move xpdf to a separate project and linked with headers and binary as its built each time and should really be dealt with separately ? |
This is probably because i built the libpng on my mac and I was using 14.4. If we automate the build of those libraries too we should solve the issue, but we can deal with this later.
Oh 😮 |
@AaronNGray I think the ICU was updated only on mac, not the Linux binaries 🤔 edf1944 |
I've no idea, but it's a warning so let's leave it for the moment https://stackoverflow.com/questions/47778099/what-is-no-pie-used-for |
Sure, but after everything else works 😄 |
I've cleaned up the cmake build so that the linux ARM architecture is correctly recognised. It fails now because the The linux 64 fails on certain problems with icu-77, I cannot identify the issue there, but this build should work as all the libraries are there. I'm not sure 🤔 |
Okay I have been having tooling issues with GitHub Actions and have had to raise a couple of issues with GitHub. Sorry I got distracted by tooling issues. I will bypass this and will have a go at both generate ICU binaries for Ubuntu/ARM64 and continue with getting ICU patches for MacOS and Ubuntu as a pull request. |
No problem, absolutely, I'm working on other part of pdfalto which I can handle. |
icu_77 namespace is not being found which means the headers are 77-1 (main) and the binary libraries are probably 76-1 ? https://github.com/kermitt2/pdfalto/actions/runs/13564890492/job/37915687473#step:8:181
|
@lfoppiano - Not sure what is going on here ? I would get it working with the old versions of the libraries first, then make sure everything compiles and links, before then check for any security vulnerabilities in the libraries before updating them. And on updating the libraries make sure the headers are the same version obviously. https://github.com/kermitt2/pdfalto/actions/runs/13564890492/job/37915687473#step:8:171
https://github.com/kermitt2/pdfalto/actions/runs/13564890492/job/37915687473#step:8:229
|
@AaronNGray Indeed, there was a compromise between having obsolete libraries and getting them working for ARM, so I guess we can try to make these latest libraries working? I think the ICU The includes under libs were updated only for libpng and zlib if I'm not mistaken. |
OK, so I've updated the include in icu (please check that I did not wipe out anything you added (sorry in advance for that)), libxml and freetype (I will include them in the static library build). Now for mac we have one error:
Also Linux build complains about (IMHO) the same issue, it seems we're getting close, hopefully I'm going to stop doing anything here, leaving to you. 😅 If you have particular issues I'm available for help. |
C++'s malloc is in include file cstdlib
…On Fri, 28 Feb 2025, 01:58 Luca Foppiano, ***@***.***> wrote:
OK, so I've updated the include in icu (please check that I did not wipe
out anything you added (sorry in advance for that)), libxml and freetype (I
will include them in the static library build).
Now for mac we have one error:
/Users/runner/work/pdfalto/pdfalto/src/Parameters.cc:93:15: error: use of undeclared identifier 'malloc'
tmp=(char*)malloc(10*sizeof(char));
^
/Users/runner/work/pdfalto/pdfalto/src/Parameters.cc:168:2: error: use of undeclared identifier 'free'
free(tmp);
^
2 errors generated.
make[2]: *** [CMakeFiles/pdfalto.dir/src/Parameters.cc.o] Error 1
make[1]: *** [CMakeFiles/pdfalto.dir/all] Error 2
Also Linux build complains about (IMHO) the same issue, it seems we're
getting close, hopefully
I'm going to stop doing anything here, leaving to you. 😅 If you have
particular issues I'm available for help.
—
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAU4E53CGDV4WYOT25CS4D2R67FBAVCNFSM6AAAAABXQ3FAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBZGUZDKNBQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: lfoppiano]*lfoppiano* left a comment (kermitt2/pdfalto#179)
<#179 (comment)>
OK, so I've updated the include in icu (please check that I did not wipe
out anything you added (sorry in advance for that)), libxml and freetype (I
will include them in the static library build).
Now for mac we have one error:
/Users/runner/work/pdfalto/pdfalto/src/Parameters.cc:93:15: error: use of undeclared identifier 'malloc'
tmp=(char*)malloc(10*sizeof(char));
^
/Users/runner/work/pdfalto/pdfalto/src/Parameters.cc:168:2: error: use of undeclared identifier 'free'
free(tmp);
^
2 errors generated.
make[2]: *** [CMakeFiles/pdfalto.dir/src/Parameters.cc.o] Error 1
make[1]: *** [CMakeFiles/pdfalto.dir/all] Error 2
Also Linux build complains about (IMHO) the same issue, it seems we're
getting close, hopefully
I'm going to stop doing anything here, leaving to you. 😅 If you have
particular issues I'm available for help.
—
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAU4E53CGDV4WYOT25CS4D2R67FBAVCNFSM6AAAAABXQ3FAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBZGUZDKNBQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, I added it and now only the linux build are working 😭 😂 but the macos build it does not 🤔 |
Looks like cstdlib is fine on XCode, it should be. Theres two separate issues, one with libfreetype which looks like it might be a versioning issue, either between the binary and the headers or its an update in ./lib
The other with libxml2 and iconv, again a versioning issue.
|
I am thinking it might have been better to fetch the libraries at build time and build them to use them rather than building and storing in ./lib ? |
All static libraries and includes are coming from the same version. Ideally the include population should be also automated, however, there was an issue with the flags of Libxml2 so after correcting that there is the issue with freetype and ftbzip2. The |
Can we make a test branch try going back to the original older releases for
the broken libraries. Then at least we will know where we are and it's not
something else.
…On Fri, 28 Feb 2025, 22:43 Luca Foppiano, ***@***.***> wrote:
All static libraries and includes are coming from the same version.
Ideally the include population should be also automated, however, there was
an issue with the flags of Libxml2 so after correcting that there is the
issue with freetype and ftbzip2.
The /lib comes from history, we can change that too.
There is a makefile being worked on which could replace the
install_depts.sh script , @flydutch <https://github.com/flydutch>, could
you please push or create a PR to share the makefile you were working on?
—
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAU4E7KEXIVPN4JZKSUPS32SDRAFAVCNFSM6AAAAABXQ3FAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJRGY3DSMJUHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: lfoppiano]*lfoppiano* left a comment (kermitt2/pdfalto#179)
<#179 (comment)>
All static libraries and includes are coming from the same version.
Ideally the include population should be also automated, however, there was
an issue with the flags of Libxml2 so after correcting that there is the
issue with freetype and ftbzip2.
The /lib comes from history, we can change that too.
There is a makefile being worked on which could replace the
install_depts.sh script , @flydutch <https://github.com/flydutch>, could
you please push or create a PR to share the makefile you were working on?
—
Reply to this email directly, view it on GitHub
<#179 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAU4E7KEXIVPN4JZKSUPS32SDRAFAVCNFSM6AAAAABXQ3FAAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJRGY3DSMJUHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Apologize for the mess. Yes, I did create a branch called feature/working-build but then I found the problem, the flag for cmake for freetype have changed so fixing that produced a working static library. I wonder why on Linux this did not happens 🤔 https://github.com/kermitt2/pdfalto/actions/runs/13598462738 |
Cool, well done, now we can move forward again ! |
IMHO, suggestion for the next steps (not in order) are:
|
Maybe we create a separate master issue with tick box todos ? ala ...
I have x64 Mac but it's stuck back on MacOS Catalina. Dunno if we can run GitHub self runner actions on x64 MacOS ?
Can this be done by a GitHub action rather than makefile ?
As I say if it's not too complex a GitHub action is more appropriate and easier debugged.
We can automate this properly once we have everything working with GROBID. I have meant to be working on learning GitHub automation, but examples and documentation for doing releases are not very obvious. I need to have a go at writing an example repo that does what we need for the projects.
We ideally need some form of testing yes. Is there a |
I've added issues for each of the elements, for the Makefile, it was suggested by @flydutch, the rationale is that the full build will be reproducible locally. We can think about it later |
We will need Docker file scripts for GROBID. Not sure how pdfalto works with this as It have not looked at that area in about 3 or 4 years ! |
@AaronNGray I did not understand what you mean 🤔 . the Makefile would be only for building pdfalto + dependencies |
uconv is missing on :-
https://github.com/kermitt2/pdfalto/actions/runs/13424243421/job/37503837019#step:5:20
https://github.com/AaronNGray/pdfalto/actions/runs/13435341396/job/37536256574#step:4:263
but uconv is still not found on either :-
or
The text was updated successfully, but these errors were encountered: