Page 1 of 1

SNAFU w/ installing tarball under MX-16 KDE - SOLVED

Posted: Sat Jun 03, 2017 10:59 pm
by eemaestro
I tried installing nice editor ne from the tarball ne-3.1.0.tar
Please note this is a Konsole (bash shell) application.
Following the instructions in INSTALL.md, I get these strange error
messages from within the ne-3.1.0 subdirectory:

Code: Select all

#   make PREFIX=/home/jon/opt build install
( cd doc; make )
make[1]: Entering directory '/home/jon/ne-3.1.0/doc'
texi2dvi  ne.texinfo
make[1]: texi2dvi: Command not found
<builtin>: recipe for target 'ne.dvi' failed
make[1]: *** [ne.dvi] Error 127
make[1]: Leaving directory '/home/jon/ne-3.1.0/doc'
makefile:26: recipe for target 'docs' failed
make: *** [docs] Error 2
and

Code: Select all

root@mx1:/home/jon/ne-3.1.0# make
( cd doc; make )
make[1]: Entering directory '/home/jon/ne-3.1.0/doc'
texi2dvi  ne.texinfo
make[1]: texi2dvi: Command not found
<builtin>: recipe for target 'ne.dvi' failed
make[1]: *** [ne.dvi] Error 127
make[1]: Leaving directory '/home/jon/ne-3.1.0/doc'
makefile:26: recipe for target 'docs' failed
make: *** [docs] Error 2
Does this ring a bell for anybody? I have no clue.

If I try it instead from the doc subdirectory, I get this:

Code: Select all

# cd doc
root@mx1:/home/jon/ne-3.1.0/doc#   make PREFIX=/home/jon/opt build install
make: *** No rule to make target 'build'.  Stop.
root@mx1:/home/jon/ne-3.1.0/doc#   make
texi2dvi  ne.texinfo
make: texi2dvi: Command not found
<builtin>: recipe for target 'ne.dvi' failed
make: *** [ne.dvi] Error 127
root@mx1:/home/jon/ne-3.1.0/doc# exit
I thought maybe somebody might have seen something like this previously.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sat Jun 03, 2017 11:42 pm
by skidoo
ne (version 3.0.1-2) is available from debian repository, as well as its docs ~~ packaged separately (package name "ne-doc ")

If you would prefer to self-build rather than apt-get install ne I'd suggest the following:
visit https://packages.debian.org/stretch/ne and download ne_3.0.1.orig.tar.gz and ne_3.0.1-2.debian.tar.xz

mkdir /tmp/ne
mkdir /tmp/ne/debian
then extract ne_3.0.1.orig.tar.gz and copy its content into /tmp/ne
Also extract ne_3.0.1-2.debian.tar.xz, and copy its content into mkdir /tmp/ne/debian

If you've put things into place as intended, you'll have a "control" file residing at /tmp/ne/debian/control
The control file lists the build dependencies that you'll need to install before proceeding.
( Build-Depends: debhelper (>= 9), libncurses5-dev, texinfo, install-info )
After these have been installed, build and install by performing the following:

Code: Select all

cd /tmp/ne
./configure
dpkg-buildpackage -j9 -b -us -uc
Yes, manually invoking "make" is absent from the process.
Yes, I'm advising "ignore the Now build ne with `make` msg" displayed when configure exits.
The "dpkg-buildpackage" utility automates the chroot, make, and interim steps.
Refer to its manpage to check which commandline options you might prefer (instead of those show here, above)

Explanation of the dpkg-buildpackage commandline options suggested above:

Code: Select all

-jNN    instruct how compiler many concurrent thread to use
                   rule of thumb: number of CPU cores, x2 (if CPU is hyperthreading-capable), plus 1
-b        just binaries, skip creating deb-src file
-us
-uc      skip signing (src+pkg)
When dpkg-buildpackage has successfully completed, in the parent dir of the source directory you'll find the debfile it created.
To install: sudo dpkg -i /tmp/my_fresh_new_packagefile.deb

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 12:00 am
by skidoo
If your v3.0.1 build is successful, you can copy the content of /tmp/ne/debian into place within the source tree for the newer version,
and edit the version number stated in the "control" file, and (recommended) merge the following into the debian -pathed changelog file.
To build, repeat the same steps mentioned in my previous post.
(Note: I didn't check whether the debian patches apply cleanly against the new version)

Code: Select all

(This file, CHANGES, lists fixes. See NEWS for new features and enhancements.)

3.1.0

  * Comments in .yaml files are highlighted more correctly.

  * Determine better whether Find and FindRegExp patterns need to be recompiled
    when switching buffers. Fix possible lockup after cancelled Find.

  * Fixed missing screen update after ABOUT (regression introduced in 3.0.1).
    Thanks to Brian Callahan for reporting this bug.

  * Help command uses its optional parameter again.

  * PasteVert behaves beyond the right end of lines again.

  * AutoComplete keeps words containing apostrophes as single words ("can't"
    instead of "can" and "t").

  * Home, End, Tab keys now work in menus.

  * Backward FindRegExp works again.

  * Resizing the window in inputs, requesters is more sane.

  * Restored correct keyboard input for 8-bit character sets.

  * Update syntax code for feature parity with current Joe.

Code: Select all

(This file, NEWS, lists new features and enhancements. See CHANGES for fixes.)

3.1.0

  * Large files that do not fit into memory are memory-mapped transparently
    if enough disk space is available.

  * Determine a "virtual extension" based on document contents and patterns
    from ~/.ne/.extensions. Allows overrides of specified extensions only.
    If no match, use .default#ap prefs.

  * Status flag "!" indicates the last line of document is not empty, thus
    the last line of the resulting saved file will not be terminated.

  * Requesters by default no longer remove non-matching entries as you
    enter characters. Use Insert or Delete keys within a requester
    to toggle between these behaviors.

  * Documents loaded through file requesters now have relative instead of
    absolute paths.

  * New NameConvert command (NC for short) changes current document's file
    name from relative to absolute path or absolute to relative path.

  * "SetBookmark ?" and "GotoBookmark ?" now prompt for the bookmark you
    want to set/goto. The prompt also indicates which bookmarks are set.

  * Command line option "--read-only" opens next document in read-only mode.

  * Options "--read-only" and "+N,M" can be applied to piped input:
      ls -l | ne --read-only +3,5 -

  * Warn if SaveAs would overwrite an existing file.

  * Suspend (Crtl-Z) works in prompts, requesters.

  * "KeyCode" now takes optional parameter.

  * Immediately/only after "Not Found", RepeatLast wraps around to the
    other end of the document.
ps:
v3.1.0 was released in April.
The current source in github repo contains some interesting further changes https://github.com/vigna/ne/commits/master

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 5:12 pm
by Stevo
You mostly describe the method of what we do when backporting a package, but a few notes:

You should not run any configure step beforehand, as the Debian build process will handle that, and will indeed pass different configure options than the default. (In fact, looking at INSTALL.md, it appears that ne does not use a configure file process at all, so that command will fail)

The build folder doesn't have to be in /tmp; it can be any folder in your home directory, just as long as there are no whitespaces in the path to that folder.

The build error in the first manual build was due to texinfo not being installed.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 5:32 pm
by eemaestro
Stevo, I don't have any whitespace in any of my file or subdirectory names.
No texinfo. Can't get it. Don't know what it is. Don't care. If it were necessary it would be in the tarball, wouldn't it be?

Code: Select all

root@mx1:/etc/apt# apt-get install texinfo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package texinfo is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  install-info info

E: Package 'texinfo' has no installation candidate

Code: Select all

$ lsb_release -a
No LSB modules are available.
Distributor ID: MX
Description:    MX-16 Metamorphosis (Migrated)
Release:        16-migrated
Codename:       Metamorphosis-migrated
skidoo, you must have misunderstood me. I was trying to install the ne 3.1.0 tarball, not the 3.0.1 version.

Code: Select all

lsf ne*.tar*
-rw-r--r-- 1 jon jon 4136960 Jun  3 22:39 ne-3.1.0.tar
However, any version with the --no-syntax command-line option would be okay. I also tried installing with APT, but APT couldn't find it.

Code: Select all

#  apt-get install ne
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ne
Is something missing from my repository files? I haven't changed anything
yet.

Code: Select all

root@mx1:/etc/apt# cat sources.list.d/mx16.list
# Mepis Community Main and Test Repos
deb http://mxrepo.com/mx/repo/ mx16 non-free main 

root@mx1:/etc/apt# cat sources.list
# deb http://http.debian.net/debian/ jessie-backports main 
ne is a console application. So its software shouldn't depend on the window
manager at all, should it? Any debian version should work. I guess I could try to find a .deb file and try installing it with dpkg.

UPDATE:
I found ne 2.5-1 in synaptic. But got error messages when I tried installing it:

Code: Select all

Failed to fetch http://mxrepo.com/mx/repo/dists/mx15/main/i18n/Translation-en_US.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx15/main/i18n/Translation-en.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx15/non-free/i18n/Translation-en_US.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx15/non-free/i18n/Translation-en.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx16/main/i18n/Translation-en_US.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx16/main/i18n/Translation-en.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx16/non-free/i18n/Translation-en_US.xz  
Failed to fetch http://mxrepo.com/mx/repo/dists/mx16/non-free/i18n/Translation-en.bz2  
Some index files failed to download. They have been ignored, or old ones used instead.
Something in my configuration filess must be mucked up, but I don't know where.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 6:00 pm
by kmathern
eemaestro wrote:No texinfo. Can't get it. Don't know what it is. Don't care. If it were necessary it would be in the tarball, wouldn't it be? ...
texinfo is in the Debian Jessie repo and it's a build depend (not included in the tarball) for ne.

Code: Select all

$ apt-cache policy texinfo
texinfo:
  Installed: 5.2.0.dfsg.1-6
  Candidate: 5.2.0.dfsg.1-6
  Version table:
 *** 5.2.0.dfsg.1-6 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
There's something wrong with your repos if it's not available.


Btw the 3.10 version of ne builds okay if you reuse the debian folder from the Stretch debian.tar.xz tarball (http://http.debian.net/debian/pool/main ... ian.tar.xz) and place it in the extracted ne tarball folder and build it Debian style like Stevo or skidoo suggest.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 6:10 pm
by Stevo
Installing devscripts also adds some handy tools I use every time when building packages, such as "dch" and "debuild".

We also have many of the packaging tools preinstalled in MX that vanilla Debian does not. If in Debian, the "packaging-dev" metapackage is worth considering.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 6:34 pm
by timkb4cq
eemaestro wrote:No texinfo. Can't get it. Don't know what it is. Don't care. If it were necessary it would be in the tarball, wouldn't it be?
Program tarballs for Linux programs are generally written to use a system of shared libraries and utilities that are available in most distributions. That's in contrast with Windows programs that assume if a library is not bundled with Windows they need to include it in the tarball.
Thus nearly all programs for Linux have a README or INSTALL file in the tarball that, among other things, lists what libraries & utilities the program is dependent upon so that you can install them with your package manager before trying to build the program.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Sun Jun 04, 2017 10:16 pm
by eemaestro
APT installed ne_2.5-1_amd64.deb .. Thank you for adding the package.

Code: Select all

$ apt-cache policy texinfo
texinfo:
  Installed: (none)
  Candidate: 5.2.0.dfsg.1-6
  Version table:
     5.2.0.dfsg.1-6 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
I see texinfo is a text-formatting library for printing. I didn't know ne printed.
Must be a new feature.

Thank you for correcting me, timkb4cq. I will look at the depencies in the
ne-3.1.0.tar folder.

Am not quite sure what you mean by the "Debian build process", Stevo. I was
talking about installing a tarball, which I just learned may have external dependencies that must be resolved (by what I don't know). Are you talking about making a .deb package? I don't know enough about .deb packages to know the differences between a .deb package and a tarball. Am guessing a .deb package contains object code as well as source code?

Will try your technique of compiling/installing 3.1.0 or 3.0.1 tomorrow, skidoo,
during daylight hours, iff I can get a version of texinfo. I'll search the web to see if I can find out which package contains it. Do you remember the name of the "control" file ?

Thanks to all who commented.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 1:57 am
by skidoo
name of the "control" file
By convention, across debian source packages, the control file is exactly control (is literally that)

I've lost track of which end up. If you're now talking about retrieving the source package for "texinfo"...
someone already pointed out "no need to self-build. It's already available binary-packaged, from debian repos".
Supposing you, for some reason, dowant to self-build it, pick (which version)
https://packages.debian.org/jessie/texinfo
https://packages.debian.org/sid/texinfo
right-hand side of those pages you'll find link to download "orig" + "debian" source archivefiles.
When you extract the content of the "...debian.tar.xz" you'll find the control file right in the top-level directory.
talking about installing a tarball, which I just learned may have external dependencies that must be resolved (by what I don't know)
The control file lists the runtime and build-time dependencies.
Might (aka "may") probably varies according to which build options you enable/disable. If you disable a given feature, certain dependencies become moot.
Am guessing a .deb package contains object code as well as source code
reading the manpage for `dpkg-buildpackage` should be helpful.
A *.deb file will not contain source code. You can pass a commandline option to instruct "separately, also generate a source package".
In the context of self building, generating "source package" is pointless ~~ you already have the source(s) in hand.
A package maintainer would generate a source package and upload it to the appropriate deb-src repository.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 2:28 am
by skidoo
Stevo wrote:a few notes:

You should not run any configure step beforehand, as the Debian build process will handle that, and will indeed pass different configure options than the default. (In fact, looking at INSTALL.md, it appears that ne does not use a configure file process at all, so that command will fail)
Oops... and thanks for clarifying that.
The build folder doesn't have to be in /tmp; it can be any folder in your home directory, just as long as there are no whitespaces in the path to that folder.
My rationale for using /tmp has been "tmpfs ~= speedy ramdrive". Maybe that's moot?
With (or without) -rfakeroot option, does dpkg-buildpackage already employ a tmpfs working directory?

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 11:51 am
by eemaestro
I looked for the file control in ne-3.1.0/ but it wasn't there. I tried to build from this untarred tarball subdirectory after installing textinfo with #apt-get install texinfo.
Here's what I got.

Code: Select all

jon@mx1:~/ne-3.1.0$ less INSTALL.md
jon@mx1:~/ne-3.1.0$ make build install
( cd doc; make )
make[1]: Entering directory '/home/george/ne-3.1.0/doc'
texi2dvi  ne.texinfo
You don't have a working TeX binary installed, but the texi2dvi script
can't proceed without it. If you want to use this script, you have to
install some kind of TeX, for example TeX Live Debian packages. You can do
that with this command:
       apt-get install texlive
<builtin>: recipe for target 'ne.dvi' failed
make[1]: *** [ne.dvi] Error 1
make[1]: Leaving directory '/home/jon/ne-3.1.0/doc'
makefile:26: recipe for target 'docs' failed
make: *** [docs] Error 2
jon@mx1:~/ne-3.1.0$ find ./ -name "*control*"
Evidently I need to stop putting the cart before the horse. Where is that control file ?

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 12:15 pm
by skidoo
The terminal output you pasted explicitly advises how to proceed:

Code: Select all

 apt-get install texlive
ps:
For any/every package, you will find a control file within the *.debian.tar.bz2 (aka "debian source file")

Image

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 1:50 pm
by Stevo
The control file is provided by a Debian packager inside a /debian folder--the upstream source almost always lacks one of these. So you need to be using "debianized" source files, such as you can get from packages.debian.org.

Re location of the build file: I didn't see any speedup when I built a kernel package on an SSD drive vs a rotating drive, so I don't know if a /tmp in RAM would make it any faster. We await your tests! Anyway, some package builds, such as web browsers, kernels, and especially things like llvm and mesa, would end up with /tmp holding many GB, and also require a lot of RAM, so I'd worry about running out of RAM for those. I don't think that would come into play for ne, though.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 2:17 pm
by eemaestro

Code: Select all

# cd
root@mx1:~# find /home/jon/ -name "*debian.tar.bz2"
root@mx1:~# find /home/jon/ -name "*.tar.bz"       
root@mx1:~# find /home/jon/ -name "*.tar.gz"
.
.
.
/home/jon/Downloads/ne-3.1.0(1).tar.gz
.
.
.
Okay, skidoo, so after finding the control file in texinfo_5.2.0.dfsg.1-6.debian.tar.xz that I downloaded from
https://packages.debian.org/jessie/texinfo, I see that it
specifies the standard debian libraries under Depends:, for example,

Code: Select all

Depends: ${shlibs:Depends}, ${misc:Depends}, libtext-unidecode-perl, libintl-perl, libxml-libxml
I see that three external libraries are needed to link the object code.
I don't know what sets the BASH variables shlibs:Depends and misc:Depends.
I don't know what the Suggests: line means. Nor "Multi-Arch: foreign"

Will my tarball ne-3.1.0(1).tar.gz be good for updating to the 3.X version of ne ?
Or do I need to find a corresponding *.debian.tar.bz2 file in order to ensure that ALL external references are correctly linked during the make install process? I guess I would need to find the *.debian.tar.bz2 file in order to have a control file to read. But I don't know if that's necessary for a system-wide install of ne 3.X.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 2:31 pm
by kmathern
...do I need to find a corresponding *.debian.tar.bz2 file ...?
There isn't a corresponding *.debian.tar.bz2 file yet for the 3.1.0 version of ne, the 3.0.1-2 one for Stretch works okay though (see my comment in this post viewtopic.php?p=415376#p415376), I didn't try it but the Jessie 2.5-1 *.debian.tar.bz2 file might even work also.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 3:21 pm
by Stevo
I built packages of the latest 3.1.1 release of ne. I just adapted the latest debian folder from upstream Debian.

https://drive.google.com/open?id=0BxE7w ... UNTTEJYQjg

eemaestro, we have a guide in the wiki on how to do this, or there's a shorter "cargo cult" guide to backporting in the Debian wiki. They work for many packages in that mode, but many will require some more research into the various versions of libraries and build tools in order to get a successful backport. Ne didn't require anything except following the recipe.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 8:18 pm
by eemaestro
Okay, Stevo, I got your deb file from that URL and installed it.

Code: Select all

# dpkg -i ../ne-3.1.1/ne_3.1.1-0mx15+1_amd64.deb
(Reading database ... 202706 files and directories currently installed.)
Preparing to unpack .../ne_3.1.1-0mx15+1_amd64.deb ...
Unpacking ne (3.1.1-0mx15+1) over (2.5-1) ...
Setting up ne (3.1.1-0mx15+1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for menu (2.1.47) ...
root@mx1:/home/george/linux# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Thank you for simplifying my life, Stevo!
Since I don't know the recipe yet, I googled "debian package management primer for C programmers" and found some URLs to brief me on the recipe, how to make the recipe, and how to adapt the recipe to CPU architecture. Some are part of debian.org. I'm starting with such basics as https://www.debian.org/doc/manuals/debi ... cs.en.html
It seems to work so far. In a few days, if all checks out with this version, maybe I'll suggest adding it to the mx16 repo.

Re: SNAFU w/ installing tarball under MX-16 KDE

Posted: Mon Jun 05, 2017 9:16 pm
by Stevo
This is what I meant for a simple guide--it's the first result I searched for "backports debian wiki":

https://wiki.debian.org/Backports

and it had a link to the entry to create your own backports:

https://wiki.debian.org/SimpleBackportCreation

Like I said, it works for many packages without changing any other files. If they fail, often we can tweak them to get them to build, but experience and strong Google-fu help a lot with that. Some require new base packages, so we are just stumped for those ones.