LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 06-08-2016, 12:38 AM   #1
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Rep: Reputation: Disabled
Trouble compiling Firefox, mozjs, et al


LFS: Version SVN-20160527 (non-systemd)
BLFS: Version 2016-06-06
Build Host: Arya Linux live CD. Booted CD, mounted disk, built tools and base system by hand (no automated scripts), absolutely no errors nor deviations from book.

Base system came out flawless. Built the rest of the system in chroot from a previous LFS (3 years old)

Background: Successfully built LFS many times in the last 10 years or so, in VM and baremetal. Also have failed at it for numerous reasons over the years, mostly due to build host being strange or rushing through and trying my own thing...

Everything has gone well. From tools build to base install. Getting X up and running, fvwm, etc.
Only time I had to deviate was for logrotate having an error in the source, I'll post patch inline here for anyone else.

Now to the issue at hand.
I'll skip most of the colorful commentary and get right to the point.
Firefox-46.0.1 failed to compile with a "cannot access system_wrappers" error. I set the notion aside since I had better things to do and Firefox was not a priority, Elinks works fine.
Was compiling mozjs17.0.0 a few days later for libnotify I believe and got an error that seemed familiar - sure enough "cannot access system_wrappers_js: No such file or directory".

Looking into it a little bit I can see that perl is being called to run a script to parse a file of headers which creates a directory and loops some stuff... but apparently the script is not working in the LFS build.
Toss the mozjs17.0.0 source on my son's Slack box, and it runs fine.
So it seems to be localized to this build. Has anyone else come across this? It's not *that* big of a deal right now, I don't necessarily need a graphical web browser. Guess I could always grab a binary from mozilla or compile on another box. But I see no mention of this anywhere online and thought I'd dump the info here for others to see.

Error output from compiling mozjs17.0.0, which is almost verbatim of the firefox error
Code:
        ../config/system-headers | /usr/bin/perl ../config/make-system-wrappers.pl system_wrappers_js
/usr/src/misc/mozjs17.0.0/js/src/config/nsinstall -R system_wrappers_js ../dist
/usr/src/misc/mozjs17.0.0/js/src/config/nsinstall: cannot access system_wrappers_js: No such file or directory
make[2]: *** [Makefile:64: export] Error 1
And lest I forget, a simple patch for logrotate 3.9.1. I believe it has been fixed upstream though.
Code:
Common subdirectories: logrotate-3.9.1.orig/examples and logrotate-3.9.1/examples
diff -uN logrotate-3.9.1.orig/logrotate.c logrotate-3.9.1/logrotate.c
--- logrotate-3.9.1.orig/logrotate.c	2016-06-02 13:34:25.705875693 -1000
+++ logrotate-3.9.1/logrotate.c	2016-06-02 13:34:56.233877519 -1000
@@ -1779,9 +1779,9 @@
 {
     int hasErrors = 0;
 
-    if (!state->doRotate)
+    if (!state->doRotate) {
 	return 0;
-
+    }
 	if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) {
 		char *tmpFilename = NULL;
 		if (asprintf(&tmpFilename, "%s%s", log->files[logNum], ".tmp") < 0) {
Common subdirectories: logrotate-3.9.1.orig/test and logrotate-3.9.1/test
 
Old 06-08-2016, 10:52 AM   #2
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Hi, the issue with firefox is caused by make-4.2. You need to either patch make-4.2 or revert to make-4.1. See also:

http://wiki.linuxfromscratch.org/lfs/ticket/3941
 
1 members found this post helpful.
Old 06-08-2016, 11:33 AM   #3
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ah, good one.
Thanks for the info. I'll apply the fix... might even try to compile firefox again.
 
Old 06-08-2016, 06:44 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
FYI Firefox can also fail in odd places with odd errors if you don't have enough ram/swap space, 6G to be safe.
 
Old 06-09-2016, 02:28 AM   #5
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
FYI Firefox can also fail in odd places with odd errors if you don't have enough ram/swap space, 6G to be safe.
I've compiled it in the past a few times, seen some of this things it can puke on.
I plan on giving it another shot, probably tomorrow when I have more time to mess with it..... then we'll see if it pukes out on something else.
Honestly, I've had more bad luck compiling mozilla/firefox than not over the years.Perhaps it knows I hate it....
 
Old 06-09-2016, 02:53 PM   #6
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Original Poster
Rep: Reputation: Disabled
I knew it was 'too good to be true'.
Downgraded to GNU Make 4.1 just to be sure all was groovy.

First 'make' went by fine and dandy, it was during the 'make -f client.mk install INSTALL_SDK= ' phase that she barfed on her prom dress this time.

Code:
configure:18545: checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0
configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
*** Fix above errors and then restart with\
               "make -f client.mk build"
/usr/src/misc/firefox-46.0.1/client.mk:359: recipe for target 'configure' failed
Good way to be descriptive there Firefox! Is it just one package you don't like or are you telling me all of them are shot? You make as much sense as my 5 year old trying to describe his Minecraft world to me!
So I examine my system...
Quote:
-rw-r--r-- 1 root root 390 Jun 8 04:20 /usr/lib/pkgconfig/gtk+-2.0.pc
-rw-r--r-- 1 root root 341 Jun 8 04:20 /usr/lib/pkgconfig/gtk+-unix-print-2.0.pc
-rw-r--r-- 1 root root 389 Jun 7 05:00 /usr/lib/pkgconfig/glib-2.0.pc
-rw-r--r-- 1 root root 280 Jun 7 05:00 /usr/lib/pkgconfig/gobject-2.0.pc
-rw-r--r-- 1 root root 319 Jun 8 04:20 /usr/lib/pkgconfig/gdk-x11-2.0.pc
Well all that stuff seems to be in place.
Let's try this for kicks and giggles and see what happens:
Quote:
PKG_CONFIG_PATH=/usr/lib/pkgconfig/ make -f client.mk install INSTALL_SDK=
Nope. Same error.

OK, I have time to mess with this today. So I'm digging in to see what's up. Wondering if it's specific to my build and environment or if others have experienced this and just given up compiling and gone the binary route instead.

My laptop here's a good rig, 16GB memory, Core-i7, 500GB SSD with puh-lenty of space.
... time to have fun I suppose.
 
Old 06-09-2016, 09:35 PM   #7
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Original Poster
Rep: Reputation: Disabled
Installed gcc-5.3.0 in /opt and did some renaming/linking of the libs and binaries so that I would be compiling off the new (old version) compiler. Removed my compiler optimizations and such from my .profile, and even recompiled glib-2.48.1, gdk-pixbuf-2.34.0, gtk+-2.24.30, and for kicks and giggles make-4.1 and even gobject-introspection-1.48.0 with the 5.3.0 version of gcc.
Get a new source directory for old FF.
CXX='g++ -std=c++11' make -f client.mk goes fine
But what happens on the make -f client.mk install INSTALL_SDK= ???
Quote:
configure:18545: checking for gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0
configure: error: Library requirements (gtk+-2.0 >= 2.18.0 gtk+-unix-print-2.0 glib-2.0 >= 2.22 gobject-2.0 gdk-x11-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
Still giving me an error as ambiguous as Pat from SNL!!!

$PKG_CONFIG_PATH consists of /usr/lib/pkgconfig:/usr/X11/lib/pkgconfig/usr/X11/share/pkgconfig
Required, Recommended, and Optional are all met.
This is the only program giving me trouble. And truth is I likely won't even use it. It's the principle of the thing.

Has anyone else here compiled it following the SVN?
 
Old 06-09-2016, 10:40 PM   #8
Bethlehem
LQ Newbie
 
Registered: Jun 2016
Location: Hawai'i (Big Island)
Distribution: On which machine?
Posts: 6

Original Poster
Rep: Reputation: Disabled
[Solved]

Ahhhh, I feel..... well I would say 'dumb', but I'm too old to be ashamed of my mistakes. Anyhow, I'm sitting on my couch naked, so take that!

The problem here was..... me!

I was compiling all of this as a normal user, then using sudo(8) to issue make -f client.mk install INSTALL_SDK=
One big xterm opened on my desktop and using screen(1), so my scrollback wasn't all that great.

I decided to output the 'make install' to a logfile and when I checked it after it barfed I saw a reference waaaayyyy up there to xcb-shm.pc not being found in my PKG_CONFIG_PATH
Well, xcb-shm.pc is part of libxcb-1.12, and being the old fart that I am I compiled all my X stuff into /usr/X11 because 'dammit, that's where it belongs, so get off my lawn(1) !!!'

So what's the problem there you ask? Wasn't /usr/X11/lib/pkgconfig in my PKG_CONFIG_PATH as I posted earlier? Well, yes... yes it is in *my* path. Being a single user machine my .profile and my .cshrc are where I make modifications and set variables. I've never been much of a sudo(8) user, I still prefer to su root when needed and exit back to myself... but I'm trying to turn over a new leaf here! Reading the manpage I saw that by default my environment is not passed by default when I sudo a command. Which usually isn't that big of a deal but the proverbial 'make install' for FF does some more linking and such, which requires those variables that I had set *only* in my profile.

So there we have it. I now have compiled FireFox and have that info here in case anyone else runs into the same issue. But hey, at least I now have an older version of gcc in my /opt should I need it - and I have read in a few places that gcc6 is not being nice on some code.

tl;dr

I had to use 'sudo -E' to pass *my* environmental variables over to the 'make install' process.

No harm no foul.
 
  


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
Trouble compiling scoutiilabs Programming 2 01-31-2009 08:19 AM
trouble compiling w/c++ eroica Linux - Software 4 03-09-2005 02:17 PM
trouble compiling fretbrner Slackware 1 01-31-2005 12:30 PM
Trouble compiling anything banZera Slackware 4 04-07-2004 10:19 AM
Trouble with compiling gamehack Debian 3 01-11-2004 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 05:43 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
Open Source Consulting | Domain Registration