LinuxQuestions.org
Visit Jeremy's Blog.
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, 11:36 AM   #31
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 362

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, 8 views)
File Type: txt CMakeError.log.txt (2.7 KB, 3 views)
File Type: txt CMakeOutput.log.txt (68.6 KB, 2 views)
 
Old 02-10-2019, 07:23 PM   #32
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
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, 08:43 PM   #33
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,068

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

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

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, 03:48 PM   #36
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
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, 03:43 AM   #37
pchristy
Member
 
Registered: Oct 2012
Location: UK
Distribution: Slackware
Posts: 362

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
 
  


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 01:00 AM
[SOLVED] Kodi freezes on exit, kodi.bin won't die pressman57 Linux - Software 6 12-19-2016 08: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 01:57 AM
PVR addon not found in Kodi on Slackware commandlinegamer Slackware 3 02-05-2016 06:37 PM

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

All times are GMT -5. The time now is 02:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration