Skip to content

Commit

Permalink
fix: Add autogen and necessary stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
IshanGrover2004 committed Feb 4, 2024
1 parent 6f70cdb commit 1e66959
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions linux/build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ ! -e /tmp/cc/build-static.sh ]; then
mkdir -p -m777 ../lib/tessdata/
cp build-static.sh /tmp/cc/
echo 'I am making docker container'
sudo docker run -v /tmp/cc:/tmp/cc --rm -it alpine:latest sh -c /tmp/cc/build-static.sh
sudo docker run -v /tmp/cc:/tmp/cc --name ccextractor -it alpine:latest sh -c /tmp/cc/build-static.sh
# sudo docker run -v /tmp/cc:/tmp/cc --rm -it alpine:latest sh -c /tmp/cc/script.sh
cp /tmp/cc/*traineddata ../lib/tessdata/
chmod go-w ../lib/tessdata/
Expand Down Expand Up @@ -78,10 +78,9 @@ rm -r tesseract/
git clone https://github.com/gpac/gpac.git
cd gpac/
./configure
make
make install # This may fail but its ok, we got what the binary we needed
make # This may fail but its ok, we got what the binary we needed
make install-lib
cd -
rm -r gpac

# libjpeg
git clone https://github.com/winlibs/libjpeg
Expand Down Expand Up @@ -112,7 +111,7 @@ cd ccextractor/linux/
perl -i -pe 's/O3 /O3 -static /' Makefile.am
set +e
# IG this is where problem occurs
autoreconf --install
./autogen.sh
./configure --without-rust
make ENABLE_OCR=yes
set -e
Expand All @@ -121,7 +120,7 @@ set -e
gcc -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT \
-O3 -std=gnu99 -s -DENABLE_OCR -DPNG_NO_CONFIG_H -I/usr/local/include/tesseract -I/usr/local/include/leptonica \
objs/*.o \
temp.c -o temp \
-o ccextractor \
-lstdc++ --static -lm \
/usr/local/lib/libtesseract.a \
/usr/local/lib/libleptonica.a \
Expand Down

0 comments on commit 1e66959

Please sign in to comment.