WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: lynx ( build configure for picore )  (Read 18 times)

Offline mocore

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 788
  • ~.~
lynx ( build configure for picore )
« on: Today at 03:01:23 PM »
i have deeply missed lynx on pi core so ...

(briefly  ::) ) looking at
http://tinycorelinux.net/11.x/x86/tcz/src/lynx/compile_lynx
also
https://www.linuxfromscratch.org/blfs/view/svn/basicnet/lynx.html

and attempting to modify

http://tinycorelinux.net/13.x/aarch64/tcz/src/ncurses/ncurses.build

for lynx   

Code: [Select]
#!/bin/sh
#
######################################################
# Build script                                       #
#                                                    #
# See .info for details                              #
######################################################

tce-load -i compiletc squashfs-tools wget bzip2-dev openssl-1.1.1-dev ncurses-dev

######################################################
# Configure extension creation parameters            #
######################################################


 # wget https://invisible-mirror.net/archives/lynx/tarballs/lynx2.9.2.tar.gz
 # wget https://invisible-mirror.net/archives/lynx/tarballs/lynx2.9.2.tar.gz.asc

 # tar -xvf ./lynx2.9.2.tar.gz
 # cd lynx2.9.2/
 # tce-load -iw compiletc

SRCNAM=lynx2.9.2.tar.gz
WRKDIR=lynx2.9.2
EXTNAM=lynx
TMPDIR=/tmp/lynx

######################################################
# Prepare extension creation                         #
######################################################

# Remove dirs and files left from previous creation

rm -r -f $WRKDIR

rm -r -f $TMPDIR
rm -r -f $TMPDIR-doc
#rm -r -f $TMPDIR-dev
#rm -r -f $TMPDIR-terminfo
#rm -r -f $TMPDIR-common
rm -r -f $TMPDIR-utils

# Crete temporary directory

mkdir -p $TMPDIR

# Add TC specific files

#mkdir -p $TMPDIR-dev/usr/local/tce.installed
#cp $EXTNAM-dev.ins $TMPDIR-dev/usr/local/tce.installed/$EXTNAM-dev
#chmod -R 775 $TMPDIR-dev/usr/local/tce.installed
#chown -R root.staff $TMPDIR-dev/usr/local/tce.installed

######################################################
# Compile extension                                  #
######################################################

# Export variables needed for compilation

export CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -Os -pipe"
export CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -Os -pipe -fno-exceptions -fno-rtti"

# is this needed?
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

# Unpack source in current directory

tar -xf $SRCNAM

# Configure it

cd $WRKDIR

# configure options from:
# https://www.linuxfromscratch.org/blfs/view/svn/basicnet/lynx.html
# http://tinycorelinux.net/11.x/x86/tcz/src/lynx/compile_lynx

# ./configure \
# --prefix=/usr/local \

./configure --prefix=/usr/local \
--disable-static \
--localstatedir=/var \
--with-zlib \
--with-bzlib \
--with-ssl \
--with-screen=ncursesw \
--enable-locale-charset

#--without-normal

# Compile

make -j4

# Install in base temp dir

make install-full DESTDIR=$TMPDIR

# Delete compilation work directory

cd ..
rm -r -f $WRKDIR

# Create symlinks

cd $TMPDIR/usr/local/lib


# Adjust directory access rigths

find $TMPDIR/ -type d | xargs chmod -v 755;

# Strip executables

find $TMPDIR | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded

# Move files to doc extension

mkdir -p $TMPDIR-doc/usr/local/share
mv $TMPDIR/usr/local/share/man $TMPDIR-doc/usr/local/share

# Move files to dev extension

#mkdir -p $TMPDIR-dev/usr/local/lib
#mkdir -p $TMPDIR-dev/usr/local/share

#mv $TMPDIR/usr/local/include $TMPDIR-dev/usr/local
#mv $TMPDIR/usr/local/lib/*.a $TMPDIR-dev/usr/local/lib
#mv $TMPDIR/usr/local/lib/*.la $TMPDIR-dev/usr/local/lib
#mv $TMPDIR/usr/local/lib/pkgconfig $TMPDIR-dev/usr/local/lib


# Move common parts to extension

#mkdir -p  $TMPDIR-utils/usr/local
#mv $TMPDIR/usr/local/bin $TMPDIR-utils/usr/local

# Some more tuning

#rm -r -f $TMPDIR/usr/local/share
#rm -f $TMPDIR/usr/local/lib/terminfo

#mkdir -p  $TMPDIR-common/usr/local/lib
#cd $TMPDIR-common/usr/local/lib
#ln -s ../share/terminfo terminfo

#cd $TMPDIR/usr/local/lib

###################################################
# Create base extension in temp dir               #
###################################################

cd $TMPDIR
cd ..
mksquashfs $TMPDIR $EXTNAM.tcz
cd $TMPDIR
find usr -not -type d > $EXTNAM.tcz.list
mv ../$EXTNAM.tcz .

# Create md5 file

md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt

# Cleanup temp directory

#rm -r -f usr

exit; #early to test

###################################################
# Create doc extension in temp dir                #
###################################################

cd $TMPDIR-doc
cd ..
mksquashfs $TMPDIR-doc $EXTNAM-doc.tcz
cd $TMPDIR-doc
find usr -not -type d > $EXTNAM-doc.tcz.list
mv ../$EXTNAM-doc.tcz .

# Create md5 file

md5sum $EXTNAM-doc.tcz > $EXTNAM-doc.tcz.md5.txt

# Cleanup temp directory

rm -r -f usr

###################################################
# Create dev extension in temp dir                #
###################################################

cd $TMPDIR-dev
cd ..
mksquashfs $TMPDIR-dev $EXTNAM-dev.tcz
cd $TMPDIR-dev
find usr -not -type d > $EXTNAM-dev.tcz.list
mv ../$EXTNAM-dev.tcz .

# Create md5 file

md5sum $EXTNAM-dev.tcz > $EXTNAM-dev.tcz.md5.txt

# Cleanup temp directory

rm -r -f usr


###################################################
# Create utils extension in temp dir              #
###################################################

cd $TMPDIR-utils
cd ..
mksquashfs $TMPDIR-utils $EXTNAM-utils.tcz
cd $TMPDIR-utils
find usr -not -type d > $EXTNAM-utils.tcz.list
mv ../$EXTNAM-utils.tcz .

# Create md5 file

md5sum $EXTNAM-utils.tcz > $EXTNAM-utils.tcz.md5.txt

# Cleanup temp directory

rm -r -f usr



it builds and can be loaded with

tce-load -il ./lynx.tcz

but .. running it results in the same  error

Lynx web browser on Micro Core Linux:
  • google.hu: No problem.
  • hup.hu: Alert!: Error uncompressing temporary file!
Why?

the topic the above quote is from suggests loading gzip but i have that all ready and still get the error?...


Code: [Select]
lynx

Looking up lynx.invisible-island.net
Making HTTPS connection to lynx.invisible-island.net
SSL callback:ok, preverify_ok=1, ssl_okay=0
SSL callback:ok, preverify_ok=1, ssl_okay=0
SSL callback:ok, preverify_ok=1, ssl_okay=0
Verified connection to lynx.invisible-island.net (cert=lynx.invisible-island.net)
Certificate issued by: /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http:\/\/certs.starfieldtech.com\/repository\//CN=Starfield Secure Certificate Authority - G2
Secure 256-bit TLSv1.3 (TLS_AES_256_GCM_SHA384) HTTP connection
Sending HTTP request.
HTTP request sent; waiting for response.
HTTP/1.1 200 OK
Data transfer complete
/home/tc/.local/bin/brotli -j -d /tmp/lynxXXXXRQPy04/L11020-8258TMP.html.br
Alert!: Error uncompressing temporary file!

lynx: Start file could not be found or is not text/html or text/plain
      Exiting...


id presume because configure has detected i have brotli in my path
and something about that build is lacking ?

any one else care to test/improve the above script ?
ftr my test build was on picore 14.x


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12786
Re: lynx ( build configure for picore )
« Reply #1 on: Today at 03:54:01 PM »
Hi mocore
... but .. running it results in the same  error

Lynx web browser on Micro Core Linux:
  • google.hu: No problem.
  • hup.hu: Alert!: Error uncompressing temporary file!
Why?

the topic the above quote is from suggests loading gzip but i have that all ready and still get the error?...
On TC10 x86 lynx shows these dependencies:
Code: [Select]
lynx.tcz
   libidn.tcz
   ncurses5.tcz
   openssl.tcz
   gzip.tcz
   bzip2.tcz
      bzip2-lib.tcz