LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-04-2017, 12:32 AM   #1
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Problem Building Kodi on 14.2 Multilib


Greetings
After successfully installing all the mentioned dependencies at Slackbuilds.org I get a fatal error running "sh ./kodi.Slackbuild" as follows:

Code:
depbase=`echo decoder/PNGDecoder.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.  -I. -I./decoder -I/tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/../../../../../lib -I/tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/../../../../../xbmc -I/tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/../../../../../xbmc/guilib -I/tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/../../../../../xbmc/linux   -DTARGET_POSIX  -std=c++0x -O2 -DNDEBUG=1 -O2 -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11 -MT decoder/PNGDecoder.o -MD -MP -MF $depbase.Tpo -c -o decoder/PNGDecoder.o decoder/PNGDecoder.cpp &&\
mv -f $depbase.Tpo $depbase.Po
decoder/PNGDecoder.cpp:22:17: fatal error: png.h: No such file or directory
compilation terminated.
I've checked and "png.h" does exist but it was installed as "/usr/include/libpng16/png.h". I have no idea why the kodi.Slackbuild can't find it or if also having installed "libpng-compat32" has affected anything.

FWIW 64bit "libpng-1.6.23-x86_64-1" was installed as part of Recommended Full Install. All Alien Bob's instructions were followed to create a Multilib system as well as to use the 32bit 14.2 same version libpng package for "convertpkg-compat32" resulting in

Code:
  bash-4.3# ls /var/log/packages/ | grep libpng
libpng-1.6.23-x86_64-1
libpng-compat32-1.6.23-x86_64-1compat32
Any ideas on how to satisfy Kodi or get it to deal with this issue? Maybe I'm just tired but for now, I'm stopped.
 
Old 06-04-2017, 02:21 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,111

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
kodi build system should use pkgconfig to find the location of the png headers: try invoking it manually to see if something is wrong
Code:
$ pkg-config --cflags libpng
-I/usr/include/libpng16
 
Old 06-04-2017, 10:08 AM   #3
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Thank you, ponce, but the format in your [code] statement confuses me, and more importantly confuses bash. I didn't understand the line break nor the syntax as it posted. Consulting "man pkg-config" does not clear up how the "-I" option can be located after "libpng" nor lacking a space between it and "/usr/include/libpng16". It may simply be that I'm being particularly dense but I'd really like to solve this as I think you're on to an important piece of data here.
 
Old 06-04-2017, 11:02 AM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
The second line is actually the output from the command in the first line.

Code:
jbhansen@febtober:~$ pkg-config --cflags libpng
-I/usr/include/libpng16
This is used to tell the compiler where to look for libpng's header files. If this outputs something other than -I/usr/include/libpng16, then it could mean something is screwed up with your system.
 
1 members found this post helpful.
Old 06-04-2017, 11:03 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,111

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
the command I suggested you to invoke from the same root login shell from which you are trying to build kodi is
Code:
pkg-config --cflags libpng
the other line is the output that you should have
Code:
-I/usr/include/libpng16
this tells to the software that uses libpng, between other informations, that its header files can be found in the path /usr/include/libpng16 and that for gcc to find them, you have to pass "-I/usr/include/libpng16" to the CFLAGS.
the pkg-config command just parses the corresponding file in /usr/lib64/pkgconfig (or whatever you got in your PKG_CONFIG_PATH)
Code:
$ ls -la /usr/lib64/pkgconfig/libpng.pc 
lrwxrwxrwx 1 root root 11 mar 22 11:44 /usr/lib64/pkgconfig/libpng.pc -> libpng16.pc
$ set | grep PKG
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig
$ cat /usr/lib64/pkgconfig/libpng.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include/libpng16

Name: libpng
Description: Loads and saves PNG files
Version: 1.6.29
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm 
Cflags: -I${includedir}
EDIT: ok, beaten again
 
1 members found this post helpful.
Old 06-04-2017, 11:10 AM   #6
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
This line is the command
Code:
pkg-config --cflags libpng
Hopefully, this line is the output
Code:
-I/usr/include/libpng16
if your output is different, it will be a Clue


Edit: ok ok beaten beaten again again

Last edited by 55020; 06-04-2017 at 11:11 AM. Reason: just too slow today :)
 
Old 06-04-2017, 12:50 PM   #7
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
LOL Wow! I really was confused.... not that things are much better because I get exactly those results

see Here
Code:
 bash-4.3$ pkg-config --cflags libpng
-I/usr/include/libpng16
##########
bash-4.3$ cat /usr/lib64/pkgconfig/libpng.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include/libpng16

Name: libpng
Description: Loads and saves PNG files
Version: 1.6.23
Libs: -L${libdir} -lpng16
Libs.private: -lm -lz -lm 
Cflags: -I${includedir}
So why isn't it found?
 
Old 06-04-2017, 01:11 PM   #8
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,111

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
just trying to have some more informations: can you please run the kodi.SlackBuild like this and then, when it has finished, post the resulting log file somewhere (like pastebin)
Code:
su -
cd /where/the/kodi.SlacBuild/is
./kodi.SlackBuild > /tmp/build.kodi.log 2>&1
please post there also the output of these commands after the SlackBuild has ended running
Code:
grep png /tmp/SBo/xbmc-17.3-Krypton/config.log
grep png /tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/config.log
 
Old 06-04-2017, 09:03 PM   #9
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,338

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Sorry , but thinking is multilib system , my question is

you try this first ?

Quote:
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \

Last edited by USUARIONUEVO; 06-04-2017 at 09:06 PM.
 
Old 06-04-2017, 09:06 PM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Thank you again, ponce for offering assistance. I tried pastebin but the free account has a max paste size of 500kB and the log is 800kB. So I'm going to attempt to use Dropbox and I say "attempt" because of their recent rule changes where they no longer offer a public url. I'm hoping using tinyurl will overcome that issue as I did put it in my "Shared" folder. At best, without your guidance it would have taken me days to find and utilize such structured troubleshooting. I'm humbled and grateful.

First the log file kodi.build.log

If that link fails try this 2nd Attempt kodi.build.log

Then the second command
Code:
bash-4.3# grep png /tmp/SBo/xbmc-17.3-Krypton/config.log

pkg_cv_FREETYPE2_CFLAGS='-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include'
FREETYPE2_CFLAGS='-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include'
INCLUDES=' -I/usr/include/mysql  -I/usr/include/yajl -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/taglib  -I/usr/include/alsa -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/alsa -D_REENTRANT    -I/usr/include/libdrm -I/usr/include/libdrm  -I/usr/include/samba-4.0    -I/tmp/SBo/xbmc-17.3-Krypton/tools/depends/target/ffmpeg/ffmpeg-install/include '
and the third

Code:
 bash-4.3# grep png /tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/TexturePacker/native/config.log
configure:4167: $PKG_CONFIG --exists --print-errors "libpng"
configure:4184: $PKG_CONFIG --exists --print-errors "libpng"
configure:4279: g++ -o conftest -O2 -DNDEBUG=1 -O2 -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11   conftest.cpp -lgif   -lpng16 -lm -lz -lm >&5
configure:4328: g++ -o conftest -O2 -DNDEBUG=1 -O2 -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11   conftest.cpp -ljpeg  -lgif  -lpng16 -lm -lz -lm >&5
configure:4377: g++ -o conftest -O2 -DNDEBUG=1 -O2 -fPIC -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -std=gnu++11   conftest.cpp -llzo2  -ljpeg -lgif  -lpng16 -lm -lz -lm >&5
pkg_cv_PNG_CFLAGS=-I/usr/include/libpng16
pkg_cv_PNG_LIBS=-lpng16
LIBS='-llzo2 -ljpeg -lgif  -lpng16 -lm -lz -lm'
PNG_CFLAGS='-I/usr/include/libpng16'
PNG_LIBS='-lpng16'
I hope this all works for you but if you have any difficulties, just let me know and I'll find another means.

Last edited by enorbet; 06-04-2017 at 09:14 PM.
 
Old 06-05-2017, 12:14 AM   #11
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,111

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
let's check manually if png.h is there
Code:
ls -la /usr/include/libpng16/

Last edited by ponce; 06-05-2017 at 12:42 AM.
 
Old 06-05-2017, 10:04 AM   #12
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Quote:
Originally Posted by ponce View Post
let's check manually if png.h is there
Code:
ls -la /usr/include/libpng16/
No problem

Code:
 bash-4.3$ ls -la /usr/include/libpng16/
total 248
drwxr-xr-x   2 root root   4096 Jun 24  2016 .
drwxr-xr-x 510 root root  69632 Jun  3 21:27 ..
-rw-r--r--   1 root root 143196 Jun 24  2016 png.h
-rw-r--r--   1 root root  22869 Jun 24  2016 pngconf.h
-rw-r--r--   1 root root   7382 Jun 24  2016 pnglibconf.h
 
Old 06-05-2017, 10:11 AM   #13
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,111

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
well, if it's like that I'm sorry but I sincerely cannot think of any reason why it doesn't find it: looking at the config.log it seems it's looking in the right place...

what I can see from your log is that your PATH variable seems to be non-standard, check the differences (ignore the jdk and qt5 paths)
mine
Code:
which: no JsonSchemaBuilder in (/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/lib64/qt5/bin:/usr/share/texmf/bin:/tmp/sbopkg.lqxDDY/xbmc-17.3-Krypton/tools/depends/native/JsonSchemaBuilder/bin)
yours
Code:
which: no JsonSchemaBuilder in (/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/tmp/SBo/xbmc-17.3-Krypton/tools/depends/native/JsonSchemaBuilder/bin)
as you can see it seems to miss elements (qt4 and tetex ones, for example) and also /sbin comes before /usr/sbin, like /bin with /usr/bin.

from this I guess that your could not be a full install and/or you have manually changed the root PATH variable and/or you have not become root with "su -" (note the "-").

I have no idea how this can influence kodi's build, guaranteed to work only on a clean slackware full installation: I suggest you to try building it on such platform.

Last edited by ponce; 06-05-2017 at 11:48 AM.
 
Old 06-05-2017, 04:08 PM   #14
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Thanks again, ponce. I will find out if this is the problem but more importantly fix PATH variables. Since v6 Slackware I ALWAYS do full recommended install (just makes good sense to me) but I rarely add the dash to "su" and almost never use "sudo" so using simple "su" could possibly be the cause. I will find out tonight.

My best wishes to you and yours
 
Old 06-05-2017, 08:26 PM   #15
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,788

Original Poster
Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
My deep gratitude, ponce, though apparently my path envar was not a problem for kodi, it was your reminding me that Path statement items do have an order and for good reason. I fixed that order in Path but in considering how the system searches in an order to find things, I remembered that I'd wrestled with nasty png issues with Wine recently and for many weeks. So I decided to see if I'd left any "spaghetti code" or "orphans" lying around.

In all honesty after so many attempts to fix libpng with Wine, compat32, and expected versions I can't say whether a wrongly installed attempt did it on it's own or whether I tried to solve a "can't find" issue with a symlink but however they got there I found two symlinks to now empty directory versions of png.h in /usr/include/. My fix was dirty too since I didn't know for certain what had installed them so I just remade them to point to the proper /usr/include/libpng16/ files and Kodi installed.

That's the good news after all the bad I'd created but it wasn't over. I had installed all of the optional dependencies, foolishly and blindly including libcrystalhd for which there is no Slackbuild and upon the first launch, Kodi failed to find libcrystalhd and "whereis" revealed it was in /usr/lib which tells me that for some reason "./configure&&make&&make install" didn't make it x86_64. Since it wasn't installed as a package I didn't know how to properly remove it so I just added a line to kodi.Slackbuild to "--disable-libcrystalhd \ " rebuilt it (after uninstalling the broken attempt, of course) and it ran perfectly.

So it was a bit messy but Kodi is in and works very well so far. Nobody likes to hang dirty laundry but I figured I should possibly help others who might make similar dumbass mistakes and certainly you deserve to know what went wrong after all your efforts.

Thanks to you, I'm marking this happily and very successfully "Solved"
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem building kodi on -current coralfang Slackware 6 04-04-2016 04:18 AM
Building 32 bit progs/libs on multilib shoshia Slackware 2 08-27-2014 11:46 AM
Building problem of "some" 32-bit programs in Slackware64 multilib aalireza Slackware 1 06-05-2013 08:24 AM
[SOLVED] Problem building fst on a multilib system insectiod Slackware 8 02-06-2013 07:57 AM
Building WINE on Slackware64 multilib? Lufbery Slackware 12 07-19-2010 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration