WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling grief :)  (Read 3749 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Compiling grief :)
« on: July 18, 2015, 02:01:12 AM »
Trying to compile pilot-link for a couple old Palm Pilots. Will be more than a minor miracle if i can get things working, so many questions. First off, if errors are produced during './configure' or 'make' commands (fails), since TC runs from RAM is it necessary to reboot/reset for another './configure' attempt? Or can i just change my options, doublecheck dependencies and try again? Keep getting some type of fatal readline error during make, will research more later.

There was an extension called pilot-link-base in TC 4. Couldn't get it to run in TC 6 due to library error, i believe libusb related. In the TC 4 repo, there is no /src info for this extension and the info file just indicates, 'This extension includes significant changes to support libusb-1.0 and Tiny Core 3.1. Tested on TC 3.1 with a Palm Tungsten E', which doesn't help in the slightest. The extension was by dentonlt, who no longer appears active on the forum. Want to try for myself anyway.

So for now, really just need to know if a reboot is required between attempts? Thanks.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11631
Re: Compiling grief :)
« Reply #1 on: July 18, 2015, 02:45:47 AM »
Hi nitram
Quote
So for now, really just need to know if a reboot is required between attempts?
No reboot required.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Compiling grief :)
« Reply #2 on: July 18, 2015, 02:50:32 AM »
..but if "make" fails, it's better to run "make distclean" and then ./configure again.

In a few cases when "make" fails (either the distclean option doesn't exist or it doesn't work properly), it's necessary to delete the source code and untar it again.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Compiling grief :)
« Reply #3 on: July 18, 2015, 05:11:20 AM »
..and sometimes it's needed to use a fresh terminal after loading deps so it knows about the new environment.
Download a copy and keep it handy: Core book ;)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Compiling grief :)
« Reply #4 on: July 19, 2015, 01:25:54 AM »
Thanks for replies and tips - keeping notes.

Still stuck. May try to compile a different version of pilot-link. Probably my problem for being new or not reading enough, although their documentation doesn't seem overly useful. Default ./configure options also seem strange. For example, --enable-conduits is not set as default, strange as without this feature the Palm Pilot would not be able to exchange data with the computer, the primary purpose of the software. Anyway lots for me to learn.

Question: If a known dependency is popt, for example, should i load both popt.tcz and popt-dev.tcz or just the -dev version?

Question: Is it okay to compile in an Xorg/GUI environment or is there a benefit to booting to text CLI for this work? GUI makes it much easier to switch between notes, terminal, etc.

Hints appreciated: Compile finishes without issue, but still get following error during make. Does this error mean anything to anyone? Brief web search not helpful. Will keep digging, hints appreciated. Tried loading readline-dev, same error. Also tried compiling with and without '--without-readline'.

Thanks.

One of the many compile variations that failed during make:
Code: [Select]
CC="gcc -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --enable-conduits --enable-threads --enable-libusb

Make error:
Code: [Select]
gcc -march=i486 -mtune=i686 -Os -pipe -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/include -I../include        -g2 -Wall -MT pilot-dlpsh.o -MD -MP -MF .deps/pilot-dlpsh.Tpo -c -o pilot-dlpsh.o pilot-dlpsh.c
pilot-dlpsh.c:47:31: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
                               ^
compilation terminated.
Makefile:1290: recipe for target 'pilot-dlpsh.o' failed
make[3]: *** [pilot-dlpsh.o] Error 1
make[3]: Leaving directory '/tmp/pilot-link-0.12.5/src'
Makefile:1326: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/pilot-link-0.12.5/src'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/pilot-link-0.12.5'
Makefile:347: recipe for target 'all' failed
make: *** [all] Error 2

Here are the './configure --help' options:
Code: [Select]
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-maintainer-mode  enable make rules and dependencies not useful
  (and sometimes confusing) to the casual installer
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-conduits       Build the userland conduits
  --enable-threads        Add this to have built-in thread safety
  --enable-libusb         Enable usage of libusb

  --disable-debug         Shunt runtime debugging
  --enable-profile        use gprof profiling [default=no]
  --enable-xsltproc       Use xsltproc to build documentation [default=no]
  --enable-compile-warnings
                          Enable verbose compiler warnings
  --enable-compile-werror
                          Causes warnings to be treated as errors in GCC

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic              try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-libpng           Prefix where libpng is installed
  --with-bluez            Enable use of BlueZ
  --with-included-popt    use bundled popt library, not from system
  --with-libiconv         Prefix where libiconv is installed
  --without-readline      Disable readline            [default=no]
  --with-perl=perlexec    use Perl                    [default=no]
  --with-java=jdkbase     use Java                    [default=no]
  --with-tcl=tclconfig    use Tcl,                    [default=no]
  --with-tclinclude       public Tcl header dir
  --with-python=pybase    use Python,                 [default=no]
  --with-python           Compile with Python bindings
  --with-efence           use ElectricFence,          [default=no]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  CPP         C preprocessor
  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
              the first program found out of: `bison -y', `byacc', `yacc'.
  YFLAGS      The list of arguments that will be passed by default to $YACC.
              This script will default YFLAGS to the empty string to avoid a
              default value of `-d' given by some make applications.
  PKG_CONFIG  path to pkg-config utility
  BLUEZ_CFLAGS
              C compiler flags for BLUEZ, overriding pkg-config
  BLUEZ_LIBS  linker flags for BLUEZ, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to the package provider.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Compiling grief :)
« Reply #5 on: July 19, 2015, 02:07:07 AM »
Attempted older pilot-link version, md5sum checks out, same/similar make error. Ran 'make clean' and 'make distclean', tried again, error. Loaded automake and autoconf, still make error. Shooting in the dark :(

Tomorrow's another day...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Compiling grief :)
« Reply #6 on: July 19, 2015, 02:27:26 AM »
Question: If a known dependency is popt, for example, should i load both popt.tcz and popt-dev.tcz or just the -dev version?
You need both the *.tcz and *-dev.tcz versions of the extension, but loading *-dev.tcz should load *.tcz automatically (check the *-.dev.tcz.dep file).

Quote
Question: Is it okay to compile in an Xorg/GUI environment or is there a benefit to booting to text CLI for this work? GUI makes it much easier to switch between notes, terminal, etc.
Yes it is OK (except perhaps if you're compiling Xorg).

Quote
Does this error mean anything to anyone? Brief web search not helpful. Will keep digging, hints appreciated.
It means that the Makefile cannot find readline.h - probably because it is looking in /usr/include rather than /usr/local/include. You could try a symlink from /usr/include/readline -> /usr/local/include/readline to see if that helps.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
pilot-link-base - was Compiling grief :)
« Reply #7 on: August 04, 2015, 05:08:12 PM »
Minor miracle didn't happen, couldn't build an updated pilot-link for TC 6. So giving up on building new Pilot-Link or JPilot.

Got pilot-link-base from TC 4 running in TC 6, however, with CLI backup, install, list, etc working well:
     - tested via serial on ancient Palm Pilot Professional
     - tested via USB on old Palm Tungsten
     - tested via base norestore

Utilizing TC 6 popt.tcz is okay, but palm-pilot-base needs the old TC 4 libusb and usb-utils, so my hacked pilot-link-base .dep file looks like this:
popt.tcz               # utilzing existing TC 6 popt.tcz
libusb-old.tcz       # renamed from TC 4 to prevent conflict with TC 6 libusb.tcz
usb-utils.tcz         # from TC 4, TC 6 version is now called simply usbutils.tcz

To minimize confusion of USB versions in the TC 6 Apps repository, thinking of repackaging pilot-link-base for TC 6 as simply pilot-link.tcz and merging the old USB libraries (old libusb and usb-utils) directly in the new extension. Is this worthy of submitting or a no-no? Otherwise i may just create a personal extension for this beast, as it's questionable whether others may still find this old software useful in TC 6. Thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Compiling grief :)
« Reply #8 on: August 05, 2015, 03:17:32 AM »
do you perhaps need libusb-compat in tc-6.x?

libusb-compat was part of the libusb extension in tc-4.x

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Compiling grief :)
« Reply #9 on: August 06, 2015, 12:58:31 AM »
Perfect - thanks.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Compiling grief :)
« Reply #10 on: August 06, 2015, 01:18:37 AM »
See pilot-link-base.tcz is now in TC 6. Installed the repository version with a base norestore boot and it doesn't work, complaining about libusb-0.1.so.4. Installing libusb-compat.tcz fixed the problem. Could pilot-link-base.tcz.dep please be updated to the following. Thanks.

usbutils.tcz
popt.tcz
libusb-compat.tcz

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Compiling grief :)
« Reply #11 on: August 06, 2015, 03:13:39 AM »
dep file adjusted and dep file created for pilot-link-dev

BTW, pilot-link-dev has a bunch of files under /usr/local/bin that would be better placed in an extension named pilot-link-bin or similar.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Compiling grief :)
« Reply #12 on: August 06, 2015, 08:26:04 PM »
Okay, will split and submit. Thanks.