LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-08-2019, 06:52 AM   #1
RayV
LQ Newbie
 
Registered: Mar 2016
Posts: 1

Rep: Reputation: Disabled
distcc.SlackBuild patch for configure libdir option


[1]
Running distccd [distcc-3.3.2-x86_64-2.txz] on Slackware64 produces this error:

From the client:
distcc[4442] (dcc_readx) ERROR: unexpected eof on fd6
distcc[4442] (dcc_r_token_int) ERROR: read failed while waiting for token "DONE"
distcc[4442] (dcc_r_result_header) ERROR: server provided no answer. Is the server configured to allow access from your IP address? Is the server performing authentication and your client isn't? Does the server have the compiler installed? Is the server configured to access the compiler?

In the server log:
distccd[23727] (dcc_check_compiler_whitelist) CRITICAL! no /usr/lib/distcc

The masquerade symlinks are in /usr/lib64/distcc/ but without configuring the build for ${LIBDIRSUFFIX}, distccd doesn't look for this folder.
Code:
--- distcc.SlackBuild
+++ distcc.SlackBuild
@@ -27 +27 @@
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-2-patched}
@@ -93,0 +94 @@
+  --libdir=/usr/lib${LIBDIRSUFFIX} \
[2]
The SlackBuild uses GCCVER=$(gcc -dumpversion) to identify the gcc version.
But this is the version on the build system, which is not necessarily what's on the installed system.
Currently, these are 8.2.0 and 9.1.0 respectively.
Better to use the update-distcc-symlinks script to create and populate the masquerading directory:

Gotcha! - if copying this patch, note that the line '( cd $PKG//usr/lib${LIBDIRSUFFIX}/distcc ' ends in a space.
Code:
--- distcc.SlackBuild
+++ distcc.SlackBuild
@@ -107,18 +106,0 @@
-# Make a masquarade directory in /usr/lib${LIBDIRSUFFIX}:
-GCCVER=$(gcc -dumpversion)
-mkdir -p $PKG//usr/lib${LIBDIRSUFFIX}/distcc
-( cd $PKG//usr/lib${LIBDIRSUFFIX}/distcc 
-  ln -sf ../../bin/distcc c++
-  ln -sf ../../bin/distcc c89
-  ln -sf ../../bin/distcc c99
-  ln -sf ../../bin/distcc cc
-  ln -sf ../../bin/distcc clang
-  ln -sf ../../bin/distcc clang++
-  ln -sf ../../bin/distcc g++
-  ln -sf ../../bin/distcc gcc
-  ln -sf ../../bin/distcc gcc-$GCCVER
-  ln -sf ../../bin/distcc $ARCH-slackware-linux-g++
-  ln -sf ../../bin/distcc $ARCH-slackware-linux-gcc
-  ln -sf ../../bin/distcc $ARCH-slackware-linux-gcc-$GCCVER
-)
-
@@ -152,0 +135 @@
+echo /usr/sbin/update-distcc-symlinks >> $PKG/install/doinst.sh
The one problem with this is that directory paths are hard coded into update-distcc-symlinks and the gcccross_dir = "/usr/lib64/gcc-cross" doesn't exist causing a total failure of the script and no links created.

This has been fixed in commit b71ae75f
Code:
--- distcc.SlackBuild
+++ distcc.SlackBuild
@@ -79,0 +80,38 @@
+echo $'--- update-distcc-symlinks.py
++++ update-distcc-symlinks.py
+@@ -34,11 +34,20 @@
+-for gnu_host in os.listdir(gcc_dir):
+-  consider_gcc("%(gnu_host)s-" % vars(), "")
+-  for version in os.listdir(gcc_dir + "/" + gnu_host):
+-    consider_gcc("", "-%(version)s" % vars())
+-    consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
+-for gnu_host in os.listdir(gcccross_dir):
+-  consider_gcc("%(gnu_host)s-" % vars(), "")
+-  for version in os.listdir(gcccross_dir + "/" + gnu_host):
+-    consider_gcc("", "-%(version)s" % vars())
+-    consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
+-
++try:
++  for gnu_host in os.listdir(gcc_dir):
++    consider_gcc("%(gnu_host)s-" % vars(), "")
++    for version in os.listdir(gcc_dir + "/" + gnu_host):
++      consider_gcc("", "-%(version)s" % vars())
++      consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
++except FileNotFoundError:
++  pass
++except NotADirectoryError:
++  pass
++try:
++  for gnu_host in os.listdir(gcccross_dir):
++    consider_gcc("%(gnu_host)s-" % vars(), "")
++    for version in os.listdir(gcccross_dir + "/" + gnu_host):
++      consider_gcc("", "-%(version)s" % vars())
++      consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
++except FileNotFoundError:
++  pass
++except NotADirectoryError:
++  pass' | while read line
+do
+patch -p0
+done
+
 
  


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
[Patch and SlackBuild] Grub-2.02~beta2 SlackBuild and Patch. ReaperX7 Slackware 3 01-28-2015 09:30 AM
configure: error: Unable to find your mysql lib dir, specify --enable-libdir. pavanchauhan Linux - Newbie 1 04-13-2014 02:34 AM
cmake: changing libdir hydraMax Programming 1 05-01-2012 11:01 PM
Make and configure: odd libdir problem Rendaw Linux - Software 4 09-24-2005 04:47 PM
Please also check that PKG_CONFIG_PATH contains ${libdir}/pkgconfig t1mc00per Linux - General 6 02-14-2003 10:58 AM

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

All times are GMT -5. The time now is 12:23 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