rpm2txz Difficulty

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

rpm2txz Difficulty

Post#1 by Bogomips » 24 Sep 2014, 17:42

Needed libpng16

Code: Select all

guest@porteus:~$ slackyd -c p10/Por/slackyd.conf -d
...
libpng16.so.16 required by:
 --> Package: imagemagick-6.8.9.7-1-i686 (/usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/png.so)
...
Searching libpng16.so.16: nothing found.
Obtained from libpng16_16-1.6.2-2-omv2013.0.i586.rpm

Code: Select all

guest@porteus:~$ ls -l /var/log/packages/libpng16_16-1.6.2-2-omv2013.0.i586 
-rw-r--r-- 1 root root 300 Sep 23 14:14 /var/log/packages/libpng16_16-1.6.2-2-omv2013.0.i586

guest@porteus:~$ ldd /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/png.so
	...
   libpng16.so.16 => /usr/lib/libpng16.so.16 (0xb6feb000)
Turned up error upon invoking ImageMagick executable display

Code: Select all

display: relocation error: /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/png.so: symbol png_set_option, version PNG16_0 not defined in file libpng16.so.16 with link time reference
But version PNG16_0 is supposed to be in RPM

Code: Select all

libpng16_16 - A library of functions for manipulating PNG image format files
Distribution: OpenMandriva Lx 2013.0
Repository: OpenMandriva Main i586
Package name: libpng16_16
Package version: 1.6.2
Package architecture: i586
Package type: rpm
Download size: 95,95 KB
Installed size: 222,05 KB
Official mirror: abf-downloads.rosalinux.ru
This package contains the library needed to run programs dynamically linked with libpng.
Provides
    libpng16_16 [== 2:1.6.2-2:2013.0]
    libpng16.so.16
    libpng16.so.16(PNG16_0)
RPM contents according to cpio

Code: Select all

guest@porteus:~$ rpm2cpio p10/Por/var/slackyd/libpng16_16-1.6.2-2-omv2013.0.i586.rpm | cpio -it
./usr/lib/libpng16.so.16
./usr/lib/libpng16.so.16.2.0
445 blocks

guest@porteus:~$ rpm2cpio p10/Por/var/slackyd/libpng16_16-1.6.2-2-omv2013.0.i586.rpm | cpio -dim
445 blocks
usr
└── lib
    ├── libpng16.so.16 -> libpng16.so.16.2.0
    └── libpng16.so.16.2.0

1 directory, 2 files
Contents of TXZ

Code: Select all

guest@porteus:~$ tar xJf p10/Por/ImMagick/libpng16_16-1.6.2-2-omv2013.0.i586.txz -C rpm2txz

rpm2txz
├── install
│   └── doinst.sh
└── usr
    └── lib
        └── libpng16.so.16.2.0

3 directories, 2 files

guest@porteus:~$ cat rpm2txz/install/doinst.sh 
( cd usr/lib ; rm -rf libpng16.so.16 )
( cd usr/lib ; ln -sf libpng16.so.16.2.0 libpng16.so.16 )
Info from usr/lib/libpng16.so.16.2.0 same as /usr/lib/libpng16.so.16.2.0

Code: Select all

guest@porteus:~$ cmp  /usr/lib/libpng16.so.16.2.0 usr/lib/libpng16.so.16.2.0
guest@porteus:~$ readelf -V usr/lib/libpng16.so.16.2.0
...
Version definition section '.gnu.version_d' contains 2 entries:
  Addr: 0x0000000000003600  Offset: 0x003600  Link: 3 (.dynstr)
  000000: Rev: 1  Flags: BASE   Index: 1  Cnt: 1  Name: libpng16.so.16
  0x001c: Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: PNG16_0
And PNG16_0 is definitely there, and this has got me stymied :Search:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
francois
Contributor
Contributor
Posts: 5083
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: rpm2txz Difficulty

Post#2 by francois » 24 Sep 2014, 18:01

Searching libpng16.so.16: nothing found.

libpng16.so.16.2.0 is not libpng16.so.16

Try to make a link between libpng16.so.16.2.0 and libpng16.so.16 or make a copy of libpng16.so.16.2.0 and name it libpng16.so.16.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5575
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: rpm2txz Difficulty

Post#3 by brokenman » 24 Sep 2014, 19:16

Francois is right. The doinst.sh file is run when a slackware package is installed. Because this is an rpm converted to a module, this file is never run and the symlink is not created. Run the commands in the doisnt.sh file

Code: Select all

cd usr/lib ; ln -sf libpng16.so.16.2.0 libpng16.so.16
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Slaxmax
Contributor
Contributor
Posts: 403
Joined: 03 Jan 2013, 09:51
Distribution: KDE4
Location: Campinas Brazil https://goo.gl/yrxwKi

Re: rpm2txz Difficulty

Post#4 by Slaxmax » 24 Sep 2014, 19:20

Avoid packages rpm.
make your own libpng (slackbuilds)

slackbuild script (included latest libpng)
http://www.mediafire.com/download/fb4mu ... libpng.zip
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: rpm2txz Difficulty

Post#5 by Bogomips » 24 Sep 2014, 21:52

brokenman wrote:Francois is right. The doinst.sh file is run when a slackware package is installed. Because this is an rpm converted to a module, this file is never run and the symlink is not created.
But already have symlink

Code: Select all

guest@porteus:~$ ls -l /usr/lib/libpng16.so.16
lrwxrwxrwx 1 root root 18 Sep 23 14:14 /usr/lib/libpng16.so.16 -> libpng16.so.16.2.0*
Or am I missing something?

@slaxmax
Already having trouble with versions. libpng complained that previous libpng16 version tried was too high. (1.6.12 :: 1.4.12)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
brokenman
Site Admin
Site Admin
Posts: 5575
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: rpm2txz Difficulty

Post#6 by brokenman » 25 Sep 2014, 01:53

Ok your initial post doesn't say that. I don't see the file there.

Code: Select all

guest@porteus:~$ tar xJf p10/Por/ImMagick/libpng16_16-1.6.2-2-omv2013.0.i586.txz -C rpm2txz

rpm2txz
├── install
│   └── doinst.sh
└── usr
    └── lib
        └── libpng16.so.16.2.0

3 directories, 2 files
Using rpm packages will certainly complicate things and should only be used when you have no other option and you need a lilbrary not offered in slackware. Be very careful with mixing libpng packages to. This is an important library for many GUI programs and mixing the libraries is not recommended. I would recompile ImageMagick against the version of libpng that slackware carries.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: rpm2txz Difficulty

Post#7 by Bogomips » 28 Sep 2014, 00:31

brokenman wrote:Using rpm packages will certainly complicate things and should only be used when you have no other option and you need a lilbrary not offered in slackware.
Thassright. libpng16 neither in Slackware package nor in source to be found.

After due thought, and taking into consideration being able to live without png in ImageMagick, decided on a plan of attack, which involved proceeding up the list of libpng16 RPMs at pkgs.org, doing a higher version whenever there were a few moments to spare.

Next RPM up

Code: Select all

openSUSE Update:
    libpng16-16-1.6.6-4.1.i586.rpm  Library for the Portable Network Graphics Format (PNG)
guest@porteus:~$ rpm2cpio p10/Por/var/slackyd/libpng16-16-1.6.6-4.1.i586.rpm|cpio -it       
./usr/lib/libpng16.so.16
./usr/lib/libpng16.so.16.6.0
468 blocks
Checking Version and Linkage

Code: Select all

guest@porteus:~$ rpm2cpio p10/Por/var/slackyd/libpng16-16-1.6.6-4.1.i586.rpm|cpio -dim
468 blocks
guest@porteus:~$ readelf -V usr/lib/libpng16.so.16
...
Version definition section '.gnu.version_d' contains 2 entries:
  Addr: 0x0000000000003b00  Offset: 0x003b00  Link: 5 (.dynstr)
  000000: Rev: 1  Flags: BASE   Index: 1  Cnt: 1  Name: libpng16.so.16
  0x001c: Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: PNG16_0

guest@porteus:~$ tree usr/
usr/
└── lib
    ├── libpng16.so.16 -> libpng16.so.16.6.0
    └── libpng16.so.16.6.0

1 directory, 2 files
Creating Module and checking Linkage yet again

Code: Select all

guest@porteus:~$ dir2xzm usr libpng16-16-1.6.6-4.1.i586.xzm

guest@porteus:~$ mloop libpng16-16-1.6.6-4.1.i586.xzm 
 Your module has been mounted at: 
/mnt/loop
 Here is a list of the files:
lib

guest@porteus:~$ tree /mnt/loop
/mnt/loop
└── lib
    ├── libpng16.so.16 -> libpng16.so.16.6.0
    └── libpng16.so.16.6.0

1 directory, 2 files

guest@porteus:~$ ls -lh /mnt/loop/lib/libpng16.so.16
lrwxrwxrwx 1 guest guest 18 Sep 26 22:51 /mnt/loop/lib/libpng16.so.16 -> libpng16.so.16.6.0*
Activation & Run. And blow me down! (this always happens when there's no priority) :o

Code: Select all

loop12    7:12   0   5.1M  1 loop /mnt/live/memory/images/ImM_220914-png16.xzm
loop13    7:13   0   5.5M  1 loop /mnt/live/memory/images/binutils-2.23.52.0.1-i486-2.xzm
loop14    7:14   0    92K  0 loop /mnt/loop
loop15    7:15   0    92K  1 loop /mnt/live/memory/images/libpng16-16-1.6.6-4.1.i586.xzm

guest@porteus:~$ display &
[1] 4777
guest@porteus:~$ display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3040.
display: color is not known to server `BACKGROUND': Success @ error/xwindow.c/XGetPixelPacket/3052.

[1]+  Done                    display
Struck paydirt! :Yahoo!:

Now unsure whether due to hitting upon compatible version, or due to libpng of same version being provided as well in package, as previous RPM did not provide such.
SUSE wrote: Provides
libpng = 1.6.6-4.1
libpng16-16 = 1.6.6-4.1
libpng16-16(x86-32) = 1.6.6-4.1
libpng16.so.16
libpng16.so.16(PNG16_0)
Module for the Record

    Code: Select all

    imagemagick - An image viewing/manipulation program
    
        Distribution: Arch Linux
        Repository: Arch Linux Extra i686
        Package name: imagemagick
        Package version: 6.8.9.7
        Package architecture: i686
        Package type: xz
        Installed size: 10,17 MB
        Download size: 2,17 MB
        Binary package: imagemagick-6.8.9.7-1-i686.pkg.tar.xz
        Source package: imagemagick
    
    Requires
    
        fontconfig
        lcms2
        libcl
        liblqr
        libltdl
        libxext
        libxt
        perl
    _______________________________________________________________________________
    DEPENDENCIES
    System			USM			ARCH			IM
    ======			===			====			==
    fontconfig	  lcms2		 libcl		  liblqr (src)
    libxext						  libltdl	   lcms2
    libxt						    liblqr
    perl
    
    libpng16

    Code: Select all

    libpng16-16 - Library for the Portable Network Graphics Format (PNG)
    
        Distribution: openSUSE 13.1
        Repository: openSUSE Update
        Package name: libpng16-16
        Package version: 1.6.6
        Package architecture: i586
        Package type: rpm
        Installed size: 233,32 KB
        Download size: 113,67 KB
        Binary package: libpng16-16-1.6.6-4.1.i586.rpm
        Source package: libpng16-1.6.6-4.1.src.rpm
    Requires
        libc.so.6(GLIBC_2.11)
        libm.so.6
        libm.so.6(GLIBC_2.0)
        libz.so.1
        libz.so.1(ZLIB_1.2.3.4)
    Provides
        libpng = 1.6.6-4.1
        libpng16-16 = 1.6.6-4.1
        libpng16-16(x86-32) = 1.6.6-4.1
        libpng16.so.16
        libpng16.so.16(PNG16_0)
    
    guest@porteus:~$ rpm2txz p10/Por/var/slackyd/libpng16-16-1.6.6-4.1.i586.rpm 
    
    Slackware package maker, version 3.14159.
    
    Searching for symbolic links:
    usr/lib/libpng16.so.16 -> libpng16.so.16.6.0
    
    Making symbolic link creation script:
    ( cd usr/lib ; rm -rf libpng16.so.16 )
    ( cd usr/lib ; ln -sf libpng16.so.16.6.0 libpng16.so.16 )
    
    Slackware package /home/guest/libpng16-16-1.6.6-4.1.i586.txz created.
    
    Create Module

    Code: Select all

    root@porteus:/home/guest# sh p10/Por/xzmod.sh -q p10/Por/ImMagick/ImgMgk-6.8.9.7_270914 '.' /mnt/sda4/mods
    
    Default Module Name: ImgMgk-6.8.9.7_270914.xzm
    
    Installing to Fakeroot Directory
    
    libpng16-16-1.6.6-4.1.i586:                                              [240K]
    libgomp1-4.9.2-0.20140910.3.mga5.i586:                                   [110K]
    liblqr-0.4.2-1-i686:                                                     [110K]
    WARNING:  Package has not been created with 'makepkg'
    libcl-1.1-4-i686:                                                        [30K] 
    WARNING:  Package has not been created with 'makepkg'
    libltdl-2.4.2-14-i686:                                                   [840K]
    WARNING:  Package has not been created with 'makepkg'
    lcms2-2.4-i486-1: little cms engine, version 2                           [3.1M]
    imagemagick-6.8.9.7-1-i686:                                              [10M] 
    WARNING:  Package has not been created with 'makepkg'
    
    Creating Module ImgMgk-6.8.9.7_270914.xzm
    
    Parallel mksquashfs: Using 1 processor
    Creating 4.0 filesystem on /mnt/sda4/mods/ImgMgk-6.8.9.7_270914.xzm, block size 262144.
    [===========================================================================-] 568/568 100%
    Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
            compressed data, compressed metadata, compressed fragments, compressed xattrs
            duplicates are removed
    Filesystem size 5336.98 Kbytes (5.21 Mbytes)
    

    Verify SymLinks

    Code: Select all

    root@porteus:/home/guest# mloop /mnt/sda4/mods/ImgMgk-6.8.9.7_270914.xzm 
     Your module has been mounted at: 
    /mnt/loop
     Here is a list of the files:
    etc  usr  var
    
    guest@porteus:~$ tree -L 2 /mnt/loop/usr/lib
    /mnt/loop/usr/lib
    ├── ImageMagick-6.8.9
    │   ├── config-Q16HDRI
    │   └── modules-Q16HDRI
    ├── libMagick++-6.Q16HDRI.so -> libMagick++-6.Q16HDRI.so.5.0.0
    ├── libMagick++-6.Q16HDRI.so.5 -> libMagick++-6.Q16HDRI.so.5.0.0
    ├── libMagick++-6.Q16HDRI.so.5.0.0
    ├── libMagickCore-6.Q16HDRI.so -> libMagickCore-6.Q16HDRI.so.2.0.0
    ├── libMagickCore-6.Q16HDRI.so.2 -> libMagickCore-6.Q16HDRI.so.2.0.0
    ├── libMagickCore-6.Q16HDRI.so.2.0.0
    ├── libMagickWand-6.Q16HDRI.so -> libMagickWand-6.Q16HDRI.so.2.0.0
    ├── libMagickWand-6.Q16HDRI.so.2 -> libMagickWand-6.Q16HDRI.so.2.0.0
    ├── libMagickWand-6.Q16HDRI.so.2.0.0
    ├── libOpenCL.so -> /usr/lib/libOpenCL.so.1
    ├── libOpenCL.so.1 -> /usr/lib/libOpenCL.so.1.0.0
    ├── libOpenCL.so.1.0.0
    ├── libgomp.so.1 -> libgomp.so.1.0.0
    ├── libgomp.so.1.0.0
    ├── liblcms2.la
    ├── liblcms2.so -> liblcms2.so.2.0.4
    ├── liblcms2.so.2 -> liblcms2.so.2.0.4
    ├── liblcms2.so.2.0.4
    ├── liblqr-1.so -> liblqr-1.so.0.3.2
    ├── liblqr-1.so.0 -> liblqr-1.so.0.3.2
    ├── liblqr-1.so.0.3.2
    ├── libltdl.so -> libltdl.so.7.3.0
    ├── libltdl.so.7 -> libltdl.so.7.3.0
    ├── libltdl.so.7.3.0
    ├── libpng16.so.16 -> libpng16.so.16.6.0
    ├── libpng16.so.16.6.0
    ...
    root@porteus:/home/guest# uloop
    /mnt/loop has been unmounted
    
    Activate & Run

    Code: Select all

    loop11    7:11   0     5M  1 loop /mnt/live/memory/images/flashplayer-plugin-11.2.202.400-i3
    loop12    7:12   0   5.2M  1 loop /mnt/live/memory/images/ImgMgk-6.8.9.7_270914.xzm
    
    guest@porteus:~$ display &
    [1] 6941
    guest@porteus:~$ display: color is not known to server `FOREGROUND': Success @ error/xwindow.c/XGetPixelPacket/3040.
    display: color is not known to server `BACKGROUND': Success @ error/xwindow.c/XGetPixelPacket/3052.
    
    [1]+  Done                    display
    :beer:
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    User avatar
    francois
    Contributor
    Contributor
    Posts: 5083
    Joined: 28 Dec 2010, 14:25
    Distribution: kde xfce porteus manjaro kubun
    Location: Enfin l'été, le changement climatique attendu: le soleil.

    Re: rpm2txz Difficulty

    Post#8 by francois » 28 Sep 2014, 01:57

    Is it solved?
    Voltaire: Le mieux est l'ennemi du bien.

    Bogomips
    Full of knowledge
    Full of knowledge
    Posts: 2563
    Joined: 25 Jun 2014, 15:21
    Distribution: 3.2.2 Cinnamon & KDE5
    Location: London

    Re: rpm2txz Difficulty

    Post#9 by Bogomips » 28 Sep 2014, 12:04

    francois wrote:Is it solved?
    Good question. Difficulty overcome. But how? :unknown:
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    Post Reply