-
Notifications
You must be signed in to change notification settings - Fork 447
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
[FEATURE] Create linux AppImage for building CCExtractor #1592
[FEATURE] Create linux AppImage for building CCExtractor #1592
Conversation
I am using these commands(link): autoreconf --install
./configure --without-rust
make ENABLE_OCR=yes which gives error: In file included from ../src/lib_ccx/params.c:13:
../src/lib_ccx/compile_info.h:7:10: fatal error: compile_info_real.h: No such file or directory
7 | #include "compile_info_real.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:3073: ../src/lib_ccx/ccextractor-params.o] Error 1 (My guess is: the confiure.ac & Makefile.am needs to be fixed) |
@IshanGrover2004 is it working yet? Or are you still stuck with the error |
Stuck with the error |
Maybe alpine and docker are causing this, are you sure this is the right way to build AppImage? There's also appimagetool used for building it. |
You're not running the pre-build.sh script that generates that header file ;) (or using cmake; 4fe82ab) |
Currently my goal is to get ccextractor binary file which should statically linked then i will attach that binary file in AppImage |
Yeah that fixed it (I used From past few days, I tried many thing to fix this script and I am just stuck with the /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lgpac: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:1811: ccextractor] Error 1 I did build libgpac from source and i able to run |
@IshanGrover2004 have you installed libgpac on your system or you are installing it in the alpine linux under this script? |
I am installing in alpine linux in docker It is failing in mine(Arch) as well /usr/bin/ld: cannot find -lgpac: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:1811: ccextractor] Error 1 |
@IshanGrover2004 The alpine and docker method may have some outdated steps, if you really want to build AppImage I would suggest to use this package: This will help you write for ubuntu or other distro and write recipe and generate AppImage. |
That i got to know at very 1st day when i saw this script, so I was also finding some alternative method. Thank u for finding
I'll have a look and try as well |
@prateekmedia Still we want to have first |
I am able to build already, I think you should refer to this: and https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD |
I am already aware of these resources, this will result a binary which is dynamic linked(you can check by git clone https://github.com/CCExtractor/ccextractor
cd ccextractor/linux/
perl -i -pe 's/O3 /O3 -static /' Makefile.am
set +e
./autogen.sh
./configure --without-rust
make ENABLE_OCR=yes My thought process is that if somehow I can have some files(lets say a header file or obj files) which i can attach with gcc compiler to hand compile with all static( Lets take a example to explain my approach: That's why I add |
You should not care about dynamic or static, at the end you have to bundle the libraries with .so related to build in the appimage |
So do I need to make just AppImage(and doesn't care about static or dynamic) |
If you are bundling every library then nothing matters, although do remember if some system have minimum library version requirement like GLIBC 2.32 or more, then you just have to cater that. |
So should I change this PR to actually build AppImage for ccextractor (instead of build-static) |
You should just build and bundle libraries to AppImage and test in different ubuntu versions to check backward compatibility. |
build-static
Is this the exact thing for what you want @prateekmedia ? |
Yeah, something like that. |
1e66959
to
d408234
Compare
After a lot struggle with different AppImage tools, I successfully made an AppImage which is working. Edit: All done All I need right now is a photo of CCExtractor logo for AppImage icon of any of these resolution(8x8, 16x16, 20x20, 22x22, 24x24, 28x28, 32x32, 36x36, 42x42, 48x48, 64x64, 72x72, 96x96, 128x128, 160x160, 192x192, 256x256, 384x384, 480x480, 512x512) in png extension which is directly accessible by wget(Or maybe do upload it in website repo) Edit: Got the photo and opened a PR for uploading in Website repo |
d408234
to
f6d3463
Compare
This PR is ready to review and get merged |
@IshanGrover2004 have you tested the generated AppImage in your system and some other system without any dependency installed like in fresh Ubuntu 20.04? |
This script file result AppImage when your system has necessary lib installed(able to run |
@IshanGrover2004 We need to supply tessdata within AppImage, that was the purpose of this: |
Packaging libraries within the AppImage is needed to make it really replacement of static i.e. system independent as static libraries are packaged already. |
Okk let me try that as well |
1ba7139
to
f3145e3
Compare
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 2ada36d...:
All tests passing on the master branch were passed completely. NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
Check the result page for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, it builds on my machine; seems to work with a random sample for test purposes.
We should possibly update and include this in a release build.
@canihavesomecoffee This currently build AppImage successfully but it needs improvisation, So Whenever I'll get time to update I will and once achieved open PR |
In raising this pull request, I confirm the following:
My familiarity with the project is as follows (check one):
Addresses Issue #1348
What I did (Current state):
configure.ac
andMakefile.am
file (currently its giving error, maybe I am doing anything wrong here)Goal for now:
ccextracter
binary file(which is required while makingAppImage
)Code breaks at:
make
command(here).