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 11-26-2017, 09:42 AM   #1
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
Compiling firefox, error: 'This platform lacks a functioning sem_open implementation' (python2 problem)


I'm trying to compile firefox in LFS 8.1, but it stops at configure with the following error:
Code:
js/src> checking for valloc in malloc.h... yes
js/src> checking for valloc in unistd.h... no
js/src> checking for setlocale... yes
js/src> checking for localeconv... (cached) yes
js/src> updating cache /home/lena/Data/tmp/firefox/src/firefox-57.0/firefox-build-dir/config.cache
js/src> creating ./config.data
js/src> Creating config.status
Creating config.status
Traceback (most recent call last):
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/configure.py", line 124, in <module>
    sys.exit(main(sys.argv))
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/configure.py", line 34, in main
    return config_status(config)
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/configure.py", line 119, in config_status
    return config_status(args=[], **encode(sanitized_config, encoding))
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/python/mozbuild/mozbuild/config_status.py", line 136, in config_status
    reader = BuildReader(env)
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/python/mozbuild/mozbuild/frontend/reader.py", line 868, in __init__
    self._gyp_worker_pool = ProcessPoolExecutor(max_workers=max_workers)
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/third_party/python/futures/concurrent/futures/process.py", line 285, in __init__
    EXTRA_QUEUED_CALLS)
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 217, in Queue
    from multiprocessing.queues import Queue
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/build/mach_bootstrap.py", line 351, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 48, in <module>
    from .synchronize import Lock, BoundedSemaphore, Semaphore, Condition
  File "/home/lena/Data/tmp/firefox/src/firefox-57.0/build/mach_bootstrap.py", line 351, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 59, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
*** Fix above errors and then restart with\
               "make -f client.mk build"
make[2]: *** [/home/lena/Data/tmp/firefox/src/firefox-57.0/client.mk:388: configure] Error 1
I have googled, and the problem seems to be with python2. But I didn't find how to solve it.
 
Old 11-28-2017, 09:59 AM   #2
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
Not sure if this helps. I upgraded python to the latest version in the book and then compiled firefox 57.0. It took 2 1/2 hrs on a laptop, but no errors. It seems to be working. Screen fonts ok, pulse audio sound ok, geo location works. The start up screen has a different look. No problems so far.

The previous version was shorter.
 
Old 11-28-2017, 12:35 PM   #3
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
I already have the latest version of python.
 
Old 11-28-2017, 04:30 PM   #4
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
Which cpu do you have?
It is saying your cpu is having problems.
 
Old 11-29-2017, 04:37 AM   #5
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
I have i7. AFAIC there's nothing wrong with it. I think it might be something I need to activate in the kernel, something about sem_open or Semaphore, but I can't find it in menuconfig.
 
Old 11-29-2017, 07:32 AM   #6
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
I have never written semaphores, but I believe sem_open() is defined in /usr/include/semaphore.h which is part of glibc.

If these commands return a blank, that could be a problem
Code:
sysctl -A | grep kernel.sem
ipcs -ls
cat /proc/sys/kernel/sem
In menuconfig, you can do a search for IPC, since semaphores have something to do with SYSV IPC.

Also, it might be a good idea to flash the BIOS to the latest version, if this is hardware related.
 
Old 11-29-2017, 12:54 PM   #7
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
Code:
root[/]# sysctl -A | grep kernel.sem
kernel.sem = 250	32000	32	128
root[/]# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

root[/]# cat /proc/sys/kernel/sem
250	32000	32	128
Code:
$ grep IPC config
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_IPC_NS=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_SYSVIPC_COMPAT=y
# CONFIG_INET_IPCOMP is not set
# CONFIG_TIPC is not set
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_SND_CMIPCI is not set

Last edited by Lennie; 11-29-2017 at 12:56 PM.
 
Old 11-30-2017, 07:16 AM   #8
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
FWIW I will post my parameters. I don't know what the differences mean in terms of firefox compilation. As a long time gentoo user, I am used to compiling the kernel manually. As an end user, I have never had to deal with semaphores. The developers handle that.
Code:
sysctl -A | grep kernel.sem
kernel.sem = 32000	1024000000	500	32000
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.eno1.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
sysctl: reading key "net.ipv6.conf.wlo1.stable_secret"
Code:
ipcs -ls

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767
Code:
cat /proc/sys/kernel/sem
32000	1024000000	500	32000
Code:
grep IPC config-4.14.2-lfs-8.1-systemd 
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_IPC_NS=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_XFRM_IPCOMP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET6_IPCOMP=m
# CONFIG_TIPC is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_ANDROID_BINDER_IPC is not set
The laptop I am running LFS on is circa 2012. A10 cpu with 4 physical cores. Significantly slower than a dual core i7.

Maybe sr_is_boy is right. Could be a hardware problem.

Last edited by plasmonics; 11-30-2017 at 07:41 AM.
 
Old 12-01-2017, 09:29 AM   #9
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
These are my limits on a Ryzen 7 1700 with glibc 2.25.
Kernel 4.14.2.

Quote:
# sysctl -A | grep kernel.sem
kernel.sem = 32000 1024000000 500 32000
Quote:
# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767
Quote:
# cat /proc/sys/kernel/sem
32000 1024000000 500 32000
Quote:
# zcat /proc/config.gz | grep IPC
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_IPC_NS=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_SYSVIPC_COMPAT=y
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_TIPC is not set
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_INTEL_PMC_IPC is not set
# CONFIG_INTEL_PUNIT_IPC is not set
 
Old 12-01-2017, 12:24 PM   #10
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
I ran those commands at my computer at work, running LFS 7.10 and got the same as you. On my computer at home I got the same in LFS 7.10 as in 8.1, those I wrote above. So it must be something with the hardware.
 
Old 12-01-2017, 02:58 PM   #11
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
You can always downloads a pre-compiled firefox and place it in /opt.
 
Old 12-02-2017, 07:38 AM   #12
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
As a followup, I tried those commands on my desktop which is ASUS M5A97 LE R2.0 mainboard with AMD FX-4170 CPU, 16 GB DDR3 RAM. Obviously, old hardware.

In LFS 8.1, Fedora, and Gentoo, I got the same numbers as in posts #8 and #9.

Looks more and more like a hardware problem. You can also run those commands on your hardware by booting a live CD, e.g., Fedora, Ubuntu, etc. This will eliminate LFS kernel config as the problem.

Last edited by plasmonics; 12-02-2017 at 07:46 AM.
 
Old 12-03-2017, 02:48 AM   #13
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
I updated the kernel to 4.14.2 (I don't remember which kernel I was running when I posted the output above.) and now I get this, both from running system (LFS 7.10) and from chroot (LFS 8.1):
Code:
root[/]# sysctl -A | grep kernel.sem
kernel.sem = 32000	1024000000	500	32000
root[/]# cat /proc/sys/kernel/sem
32000	1024000000	500	32000
root[/]# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767

root[/]# zcat /proc/config.gz | grep IPC
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_IPC_NS=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_SYSVIPC_COMPAT=y
# CONFIG_INET_IPCOMP is not set
# CONFIG_TIPC is not set
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_SND_CMIPCI is not set
But I still get the same error. I know I can use the precompiled version from Mozilla, but I think this problem might cause other problems later, so I want to know whats the cause of it and how to fix it.
 
Old 08-05-2018, 08:59 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
In case anyone comes across this error and this thread while trying to compile firefox, try recompiling python 2.

Last edited by colorpurple21859; 08-06-2018 at 06:05 AM.
 
  


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
Python error while compiling Firefox 32.0.3 under Slackware64 14.1 moisespedro Slackware 16 09-28-2014 05:09 PM
[SOLVED] How can I make Python2.7 my default Python without deleting/removing python2.6. steves504 Linux - Server 2 03-21-2014 11:57 AM
[SOLVED] Trying to install 'Gmail Backup' but it requires python2.5 - I have python2.8... Robert.Thompson Slackware 6 05-10-2011 08:23 AM
Python2.5-devel is unable to find installed Python2.5 Setya SUSE / openSUSE 1 06-08-2007 01:35 AM
Problem when install Red Had Linux (Fedora core 1); ...python2.2: relocation error... timetldco Linux - Newbie 1 04-19-2006 06:47 AM

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

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