LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-10-2019, 10:36 AM   #31
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled

OK, I think this does the job:

Code:
NUMJOBS=$(grep "^core id" /proc/cpuinfo | sort -u | wc -l)
The use $NUMJOBS in the cmake command:

Code:
cmake --build . -- VERBOSE=1 -j$NUMJOBS
I'm attaching the new slackbuild along with the error logs (not sure why they didn't stick last time...!)

It would be nice if someone would check the slackbuild out!

--
Pete
Attached Files
File Type: txt kodi-18.SlackBuild.txt (4.4 KB, 32 views)
File Type: txt CMakeError.log.txt (2.7 KB, 11 views)
File Type: txt CMakeOutput.log.txt (68.6 KB, 10 views)
 
Old 02-10-2019, 06:23 PM   #32
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,503

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Very weird indeed!
I wasn't aware that nproc ( /usr/bin/nproc ) is not able to distinguish between real cores and logical ones (HyperThreading), nor that HyperThreading can break a cmake compilation. Used this thread for extra info (maybe you did it too):
https://stackoverflow.com/questions/...e-command-line

cmake (I'm inexperienced with it) apparently has a module that can be used to determine the processor count and maybe also can distinguish between real/logical ones.
https://cmake.org/cmake/help/v3.0/mo...ssorCount.html

Your Cmake log files do not contain anything interesting other than the "common" error I got myself related to pthread_create. Error that confused me a little because it wasn't related to the real issue I was experiencing. Just ignore it, see:
https://forum.kodi.tv/showthread.php...657#pid2815657

Again, the only way to see what actually happens is to create a compilation log:
Code:
# substitute you actual and working
cmake --build . -- VERBOSE=1 -j$NUMJOBS 
#with the older, official way
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) 2>&1 | tee kodi-build.log
Then investigate the kodi-build.log file.

Your new kodi-18.SlackBuild-1 looks OK, not sure how standard "core id" is, but it looks like working, you tested it on your older AMD & newer Intel.

You should report these findings at forum.kodi.tv, let them know about your compilation issues with (getconf _NPROCESSORS_ONLN) running on HyperThreading enabled CPUs.
 
Old 02-10-2019, 07:43 PM   #33
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,398

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
why no use $(nproc) , ?
 
Old 02-11-2019, 01:06 AM   #34
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,503

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
https://translate.google.com/transla...%23post5960352
 
Old 02-11-2019, 05:23 AM   #35
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled
OK, now I'm even more confused!

Adding the command to create a build log:

Code:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) 2>&1 | tee kodi-build.log
and it builds perfectly on the Intel machine!

Comment out the build log code:

Code:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) ###2>&1 | tee kodi-build.log
And it fails as before! Uncomment the build log again, and it builds fine!

It looks as if creating the build log slows the process down just enough to allow successful compilation! But of course that doesn't help debugging why it fails!

AAARRGGHH!

--
Pete
 
Old 02-11-2019, 02:48 PM   #36
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,503

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by pchristy View Post
OK, now I'm even more confused!
Adding the command to create a build log:
Code:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) 2>&1 | tee kodi-build.log
and it builds perfectly on the Intel machine!
Comment out the build log code:
Code:
cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) ###2>&1 | tee kodi-build.log
And it fails as before! Uncomment the build log again, and it builds fine!

It looks as if creating the build log slows the process down just enough to allow successful compilation! But of course that doesn't help debugging why it fails!

AAARRGGHH!

--
Pete
I never compiled Kodi 18 (17 included) on x86 - multi-core HyperThreading-enabled CPUs but only did it on Raspberry Pi boards (no HyperThreading), mainly because I don't trust the security of Kodi, I isolate the Raspberry Pi running Kodi from my work network, and I believe it's a waste on resources to dedicate a powerful x86 system for some simple entertainment. The Raspberry Pi Zero boards I'm using for Kodi cost 5 USD/GBP (well, around 15 with case&accessories).

Usually, when I compile on multicore systems I'm always determining manually the number of cores and disregard the virtual ones (HyperThreading). With make I never experienced such a compilation breakage and considered the internal jobs scheduling engine of make solid, properly taking care of the sequence of jobs. According to your experience now with cmake, with which I'm not really savvy, it looks like there are scheduling issues in cmake / or in the Kodi build scripts and I suggest you raise this issue with the Kodi devs. You stated in your post #7 that you're already registered at the Kodi Forum, open a new thread, shortly explain your experience and point them to this discussion here. They know better what they're doing in the Kodi cmake build scripts and I'm pretty sure they're more experienced with cmake.

For your Kodi 18 SlackBuild, keep the latest modifications you've made, determining the real number of cores. That looks sound and builds successfully.
 
Old 02-12-2019, 02:43 AM   #37
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled
I did actually start a thread over there early on in this saga, but it didn't seem to attract much attention. To be fair, it was mainly about how to integrate the binary addons, so perhaps I need to start a new one about hyper-threading.

However, as you say, I have a system that works now. I mainly use kodi to record off-air TV. Although Kaffeine is lighter, and works well, it can't decode the EPG properly on HD channels here in the UK. Kodi manages that with ease, which makes life easier when you are in hurry!

Its been an interesting learning curve,and I certainly wouldn't have got this far without your help and support, for which I'm extremely grateful!

Cheers,

--
Pete
 
Old 05-14-2019, 01:40 AM   #38
mike_booth76
Member
 
Registered: May 2006
Posts: 38

Rep: Reputation: 3
Kodi18 Skackbuild

For me your SlackBuild fails very late in the piece with the following. I'm compiling on a 32bit machine.

I don't suppose you have any ideas?


Rgds

Mike



build/filesystem/filesystem.a(FTPParse.cpp.o):FTPParse.cpp:function CFTPParse::setTime(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >): error: undefined reference to 'pcrecpp::RE::Init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcrecpp::RE_Options const*)'

Last edited by mike_booth76; 05-14-2019 at 01:41 AM.
 
Old 05-14-2019, 02:09 AM   #39
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled
Hi Mike, I'm running -current, pure 64-bit. Current is constantly changing at the moment, and I haven't needed to rebuild Kodi recently. Are you running -current?

Not sure how much help I can be. I can see some references to CXX in there - could be the latest version of gcc is causing the problem? There is a way of forcing gcc to behave like an older version - I'm not on my "build" machine at the moment, so I'll have to check later today what I had to do to get a reluctant program to compile....

--
Pete
 
Old 05-14-2019, 04:33 AM   #40
mike_booth76
Member
 
Registered: May 2006
Posts: 38

Rep: Reputation: 3
Thanks Pete. I am running current right up-to-date but 32 bit.

M
 
Old 05-14-2019, 08:31 AM   #41
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled
Mike: I've just tried building Kodi-18.2 on my machine and it built fine, using my build script. I seem to recall having some issues with 18.1, but 18.2 came out very quickly afterwards, so I assume it was an issue at the kodi end.

What I have used with recalcitrant programs in the past is adding "gcc -std=gnu89" to SLKCFLAGS - so in my case, for a 64 bit build, SLKCFLAGS would be: SLKCFLAGS="gcc -std=gnu89 -O2 -fPIC"

However, I haven't needed that with kodi, but your mileage may vary. Worth a try, anyway! The only other thing is to clear the build cache before rebuilding, as otherwise kodi keeps making the same errors from the cache. I've actually built that into my build script now - can't remember whether I'd done that on the version I put up here earlier, so I'll attach the version I've just used here. (Have to do it as a txt file, so just rename without the .txt and make executable)

Beyond that, there's not much else I can add, as I don't have a 32 bit machine anymore.

Let me know how you get on, as someone else may have a better idea.

Cheers,

--
Pete
Attached Files
File Type: txt kodi-18.SlackBuild.txt (4.5 KB, 42 views)
 
Old 05-15-2019, 05:16 AM   #42
mike_booth76
Member
 
Registered: May 2006
Posts: 38

Rep: Reputation: 3
Thanks forthe info Pete.Sadly failed at same place with same error.
On close inspection of the log ( mostly double Dutch to me) there seems to be a pointer to a PCRE problem.

I'll have a look at hat tomorrow (thats your tonight) and let you know how I go.

M
 
Old 05-15-2019, 05:40 PM   #43
mike_booth76
Member
 
Registered: May 2006
Posts: 38

Rep: Reputation: 3
Hi Pete. It was PCRE that was causing the problem./var/log/packages told me I had the latest installed but the configure was showing v1.85.Purely by chance I came across ABGA's compilation log on he kodi forum and that showed PCRE-8.42. A bit of looking arpund and I found I hade several versions of PCRE installed????? got rid of them all, reinstalled v8.43 and Bobs your uncle.

Thanks to both you and ABGA for providig a) the slackbuild and b) the configure log.

Mike
 
Old 05-16-2019, 02:31 AM   #44
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 471

Original Poster
Rep: Reputation: Disabled
Glad you got it sorted!

There are a few add-ons that don't get compiled in the core package and have to be built separately. You only really need them for off-air reception using things like TVHeadend, but there are a few "gotchas" waiting there too!

I've done a build script to integrate TVHeadend, but its a bit of a kludge. If you want, I can post it here, but there are some things I don't like about it. It does, however, work! For the moment, anyway!

--
Pete
 
Old 05-16-2019, 04:42 AM   #45
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,610

Rep: Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836Reputation: 836
Quote:
Originally Posted by pchristy View Post
I've found one reference to PPA (?), but no clue as to what that is or how to use it!
A PPA is a Personal Package Archive for Debian or derived distro's, a bit like Robby Workman or AlienBob's repositories for Slackware.
You can only use PPA's if you're using the .deb package format (and the tools for YOUR distro to install those).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Kodi Devs Celebrate New Year with First Release Candidate of Kodi 17 "Krypton" LXer Syndicated Linux News 0 01-01-2017 12:00 AM
[SOLVED] Kodi freezes on exit, kodi.bin won't die pressman57 Linux - Software 6 12-19-2016 07:48 PM
LXer: Kodi 17 "Krypton" Alpha 3 Brings Live TV and PVR Improvements, New Skin Features LXer Syndicated Linux News 0 08-03-2016 12:57 AM
PVR addon not found in Kodi on Slackware commandlinegamer Slackware 3 02-05-2016 05:37 PM

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

All times are GMT -5. The time now is 02:30 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration