LinuxQuestions.org
Help answer threads with 0 replies.
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 03-26-2019, 11:31 AM   #16
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91

Quote:
Originally Posted by ponce View Post
if you build it like this
Code:
./gcc5.SlackBuild > /tmp/build-gcc5.log 2>&1
then all of the output will go to that file
I’ll give that a try next time I can look into it.
Quote:
Originally Posted by ponce View Post
regarding what you are trying to do, in a similar way like you a trying to start with a jdk binary I think that you could also start directly using a prebuilt openjdk for current: Alien Bob already provides one

http://bear.alienbase.nl/mirrors/peo...pkg64/current/

then, with this installed, build yourself another one from source

http://bear.alienbase.nl/mirrors/peo...openjdk/build/

FYI I've just tried this, it works and you don't need gcc5 installed in your system at all.
OK—Nice to know that there’s this other option, too.

Quote:
Originally Posted by orbea View Post
I'm sure you know this, but its possible to also follow the output directly with tee.

Code:
./gcc5.SlackBuild 2>&1 | tee /tmp/build-gcc5.log
Hmmm… Great idea. Probably would have thought of this myself, but only after I had restarted the build…
 
Old 03-27-2019, 12:38 PM   #17
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
I have just retried the build, creating a full log that merges stdout and stderr, as suggested by orbea.
I now understand where the ‘make’ errors come from:
Code:
../../../../gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:141:23: fatal error: sys/ustat.h: No such file or directory
compilation terminated.
make[4]: *** [Makefile:449: sanitizer_platform_limits_posix.lo] Error 1
That obviously raises the question, what is this ‘sys/ustat.h’ file? I did a little searching, and found this: “Where to find sys/ustat.h?
Looks like it was removed in GLIBC 2.28:
Quote:
The obsolete function ustat is no longer available to newly linked binaries; the headers <ustat.h> and <sys/ustat.h> have been removed. This function has been deprecated in favor of fstatfs and statfs.
In other words, end of story.
 
Old 03-27-2019, 12:45 PM   #18
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,750

Rep: Reputation: Disabled
then who knows why it builds for me (and probably for others) on current...

http://gph.is/Quih86

Last edited by ponce; 03-27-2019 at 12:47 PM.
 
Old 03-27-2019, 01:13 PM   #19
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
Quote:
Originally Posted by ponce View Post
then who knows why it builds for me (and probably for others) on current...
You must still have a ‘sys/ustat.h’ file, then, I guess. If so, then I would be interested to know what package, if any, it came from?

That’s probably the more credible explanation.
 
Old 03-27-2019, 01:16 PM   #20
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,750

Rep: Reputation: Disabled
Quote:
Originally Posted by luvr View Post
You must still have a ‘sys/ustat.h’ file, then, I guess. If so, then I would be interested to know what package, if any, it came from?
I don't have it and, frankly, I don't know why the build running on your system looks for it.
 
Old 03-27-2019, 02:01 PM   #21
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,591

Rep: Reputation: Disabled
Quote:
Originally Posted by luvr View Post
You must still have a ‘sys/ustat.h’ file, then, I guess. If so, then I would be interested to know what package, if any, it came from?
It might be hidden by preprocessor code, we would need to look at the file to confirm. Alternatively maybe you are missing a patch or it somehow failed to apply?

If you shared the full log we might not have to play 20 questions.

Last edited by orbea; 03-27-2019 at 02:02 PM.
 
1 members found this post helpful.
Old 03-27-2019, 03:00 PM   #22
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
Quote:
Originally Posted by orbea View Post
If you shared the full log we might not have to play 20 questions.
I uploaded it: https://drive.google.com/open?id=1rE...ZbaOQMGwCmWc5h
 
Old 03-27-2019, 03:16 PM   #23
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
Quote:
Originally Posted by orbea View Post
maybe you are missing a patch or it somehow failed to apply?
Seems like this is the patch you’re referring to: https://aur.archlinux.org/cgit/aur.g...t.patch?h=gcc5. Looks like I’m missing it, indeed.
 
Old 03-28-2019, 09:00 AM   #24
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,591

Rep: Reputation: Disabled
Edit: nvm, was replying to an old post...

Last edited by orbea; 03-28-2019 at 09:01 AM.
 
Old 03-28-2019, 09:07 AM   #25
nobodino
Member
 
Registered: Jul 2010
Location: in France
Distribution: slackware, slackware from scratch, LFS, linux Mint,Manjaro...
Posts: 563

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Ponce: could you in /var/log/packages exec this: ls | xargs grep ustat.h
On my system just this:
-----------
root@darkstar1789:/var/log/packages# ls | xargs grep ustat.h
kernel-source-4.19.31-noarch-1:usr/src/linux-4.19.31/include/linux/irq_cpustat.h
-----------
 
Old 03-28-2019, 09:17 AM   #26
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,591

Rep: Reputation: Disabled
You can use https://packages.slackware.com/ to answer this question for yourself, by searching "ustat.h" under the content mode I can confirm your results.

Also you can just use grep.

Code:
grep ustat.h /var/log/packages/*
Or for convenience I got this function from slackdocs or some wiki a while ago.

Code:
# Usage: findpkg file
findpkg () 
{ 
    grep "$1" /var/log/packages/*
}
 
Old 03-29-2019, 03:40 AM   #27
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
I can confirm that the glibc2.28-ustat patch applies successfully to the ‘sanitizer_platform_limits_posix.cc’ file as extracted from the ‘gcc-5.5.0.tar.xz’ archive.

I’ll try and integrate the patch into the gcc5 slackbuild and rerun the build.
Will report back on the results.
 
Old 03-30-2019, 12:47 PM   #28
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
With the glibc2.28-ustat patch integrated, the gcc5.SlackBuild completes successfully. The generated package has the same number of files as the 64-bit multilib package from alienbob:
Code:
$ tar -tvJf gcc5-5.5.0-x86_64-1_SBo.txz | wc --lines
5562
My next step, building openjdk, now runs into a configuration error:
Code:
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
configure: error: Could not find required system headers; install the appropriate files from glibc-headers, libc6-dev and/or libattr-devel, libattr1-dev or use --disable-compile-against-syscalls if necessary.
Apparently, the ‘attr/xattr.h’ header file was deprecated, and glibc nowadays uses ‘sys/xattr.h’ instead.

The way I understand it, the icedtea-2.6.16 ‘configure’ step goes looking for ‘attr/xattr.h’ and complains that it cannot find it. I have no idea why this file is needed, though, since the only references that I can find to it in the ‘icedtea-2.6.16’ directory tree are the following:
Code:
ChangeLog:	attr/xattr.h.
acinclude.m4:    AC_CHECK_HEADERS([sys/epoll.h attr/xattr.h],
configure:    for ac_header in sys/epoll.h attr/xattr.h
Is there any reason why the header file is needed, then? It seems to me that only the ‘configure’ wants it for some reason, but I’m puzzled about where it might get used, since I cannot find any further references to it.

Anybody has any suggestions on how I might proceed from here?

In any case, following is the git patch that applies the changes that I made to the gcc5 build as it appears in the ponce slackbuilds repository.
It fixes the build for glibc 2.28, it fixes the ‘SBo’ tag in the package name to ensure that it begins with an underscore, and finally, it inserts a missing hash-sign to prevent the system from attempting to execute a command named ‘only’ on what should be a comment line:
Code:
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild
index 7054b3184f..f9a03116c5 100644
--- a/development/gcc5/gcc5.SlackBuild
+++ b/development/gcc5/gcc5.SlackBuild
@@ -57,7 +57,7 @@ PRGNAM=gcc5
 VERSION=${VERSION:-5.5.0}
 MAJVER=$(echo ${VERSION} |cut -d. -f1)
 BUILD=${BUILD:-1}
-TAG=${TAG:-SBo}
+TAG=${TAG:-_SBo}
 
 # Automatically determine the architecture we're building on:
 if [ -z "$ARCH" ]; then
@@ -195,6 +195,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
   cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff | patch -p2 --verbose || exit 1
   cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff | patch -p2 --verbose || exit 1
 
+  # Fix build with glibc 2.28, which no longer makes available header file <sys/ustat.h>
+  cat $CWD/patches/glibc2.28-ustat.diff | patch -p0 --verbose || exit 1
+
   # Fix perms/owners
   chown -R root:root .
   find . -perm 777 -exec chmod 755 {} \;
@@ -434,7 +437,7 @@ fi
 
 if [ ${MULTILIB} = "NO" ]; then
   # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
-    (only needed if gcc was compiled with disable-multilib)
+  # (only needed if gcc was compiled with disable-multilib)
   if [ "$ARCH" = "x86_64" ]; then
     sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
       $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
diff --git a/development/gcc5/patches/glibc2.28-ustat.diff b/development/gcc5/patches/glibc2.28-ustat.diff
new file mode 100644
index 0000000000..c7d71d0677
--- /dev/null
+++ b/development/gcc5/patches/glibc2.28-ustat.diff
@@ -0,0 +1,31 @@
+--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	2018/04/25 07:39:32	259630
++++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc	2018/05/24 20:07:25	260687
+@@ -138,7 +138,6 @@
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -231,7 +230,19 @@
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned struct_ustat_sz = sizeof(struct ustat);
++  // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
++  // has been removed from glibc 2.28.
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
++  || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
++  || defined(__x86_64__)
++#define SIZEOF_STRUCT_USTAT 32
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
++  || defined(__powerpc__) || defined(__s390__)
++#define SIZEOF_STRUCT_USTAT 20
++#else
++#error Unknown size of struct ustat
++#endif
++  unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
+   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
 
Old 03-30-2019, 08:47 PM   #29
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 5,946

Rep: Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644Reputation: 3644
Without figuring out whether it's needed or not, can you just use a sed command to change the location in acinclude.m4 and configure and have it compile?

Code:
sed -i 's|attr/xattr.h|sys/xattr.h|' location/to/acinclude.m4
sed -i 's|attr/xattr.h|sys/xattr.h|' location/to/configure
 
Old 04-02-2019, 02:39 AM   #30
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Debian, Xubuntu
Posts: 251

Original Poster
Blog Entries: 1

Rep: Reputation: 91
The openjdk build now reports a funny error (my bold):
Code:
ERROR: FreeType version  2.2.1  or higher is required.
 gmake[3]: Entering directory '/tmp/SBo/openjdk/icedtea-build/openjdk-boot/jdk/make/tools/freetypecheck'
/bin/mkdir -p /tmp/SBo/openjdk/icedtea-build/openjdk.build-boot/btbins
rm -f /tmp/SBo/openjdk/icedtea-build/openjdk.build-boot/btbins/freetype_versioncheck
gcc-5  -I/usr/include -I/usr/include/freetype2 -DREQUIRED_FREETYPE_VERSION=2.2.1 -o /tmp/SBo/openjdk/icedtea-build/openjdk.build-boot/btbins/freetype_versioncheck freetypecheck.c -L/usr/lib -Wl,-rpath -Wl,/usr/lib -lfreetype
/tmp/SBo/openjdk/icedtea-build/openjdk.build-boot/btbins/freetype_versioncheck
Required version of freetype: 2.2.1
Detected freetype headers: 2.10.0
Failed: headers are too old.
Detected freetype library: 2.10.0
Failed: too old library.
gmake[3]: Leaving directory '/tmp/SBo/openjdk/icedtea-build/openjdk-boot/jdk/make/tools/freetypecheck'
Granted, it was April Fool’s Day, but I assumed it was highly unlikely that that could be the cause of this quirk.

Apparently, the FreeType version check is done by a little C-language program, which compares the version numbers… as strings!

Now, given that Slackware-current (and, later on, Slackware 15.0—or whatever the next release will be, whenever it arrives) will probably not downgrade the FreeType library, and certainly not to any version even more ancient than 2.2.1, I guess the version check can just as well be skipped.

There’s a few other issues to figure out, too—such as, the references to the now defunct ‘attr/xattr.h’ header file, which will have to be changed to ‘sys/xattr.h’ in the sources. Since the makefile, by default, unpacks the sources and compiles them, all in one go, I will try and find out how I can intervene in the middle of the process in order to apply the required patches. Probably run a make on some intermediate target to unpack the sources, then apply the required patches, and finally run another make on the default, final target—or some such.

By the way, it looks like this openjdk software build closely follows the autotools framework—which I am in the process of studying, with the help of the book “Autotools—A Practitioner's Guide to GNU Autoconf, Automake, and Libtool”, by John Calcote. So, perhaps, my attempts to tweak the process may be helpful in deepening my understanding of the subject matter.

Last edited by luvr; 04-04-2019 at 03:26 PM.
 
  


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
Chromium (Alien Bob SlackBuild) 53.x.x.x - Segmentation Fault vtel57 Slackware 24 10-15-2016 08:24 PM
Alien Bob's Libreoffice 4.3.0.4 slackbuild AlleyTrotter Slackware 1 08-06-2014 04:53 PM
[SOLVED] Alien Bob's VLC slackbuild fails on current Daedra Slackware 4 10-25-2010 03:14 PM
Command to create local mirror of Alien Bob's kde4.4.0 packages damgar Slackware 5 02-11-2010 11:41 AM
[SOLVED] Wine Install fails at line 291 - Alien Bob's SlackBuild script Tim Johnson Slackware 14 02-01-2010 11:52 PM

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

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