Closed ghost closed 10 years ago
Is pthread in the buildInputs? Please share your nix-expression wit us.
I believe he means our expression, i.e. -A pkgs.spidermonkey_185. That one is used in polkit now, so a dependency of much X stuff. If that is so, then this is probably a build impurity.
Is this non-NixOS and without chroot builds?
yep, the only thing I changed it that i add
configureFlags=[" --enable-threadsafe --with-system-nspr"]
because otherwise cjs ( a part of cinnamon) cannot be build.
I added pthread in the buildinputs and dependencies but I see a error that pthread cannot be found.
This is a nixos 14.02 box
I did a little research myself andit looks like the library is not installed at all. find / -name "pthread.so.*" did not give any output.
BTW, this is not a Nixpkgs issue. If you change Nixpkgs and it breaks, it's your own bug :-)
It would be more appropriate to create an enhancement issue for whatever package needs spidermonkey with these flags.
The iibrary is called libpthread.so
. It's definitely installed, because it's a part of glibc.
Edolstra : it's for a package which is not yet in Nixpkgs namely cjs. Part of the Cinnamon desktop.
peti ; then the question is why cannot the expression for spidermonkey find it.
Note that the error message you're seeing comes from make, not from the compiler nor from the linker. I'm sure the compiler would find the library if it were run, but make doesn't run the compiler.
oke, I added pthreads to the buildsinput but still it's not found. So if anyone knows the solution.
I will make a new enhancement issue for this. so I close this.
When I think of it, thread support shouldn't hurt to even have by default for spidermonkey_185 (and it's usual in distros).
The reason here is this Makefile line:
$(SHARED_LIBRARY): EXTRA_DSO_LDOPTS += -Wl,-soname,$(notdir $(SHLIB_ABI_VER))
I didn't have a clue such magic was possible, but make doesn't see the -lpthread and -ldl libs for this purpose (presumably in EXTRA_DSO_LDOPTS
at that time), so it stops on those deps. I can hack around this problem, but if you have some good solution, it would be welcome.
It seems that for other distros don't patch this, so their make "works better" in this case (BTW, make-4.* has been released).
Because of a error message I have to compile spidermonkey 185 with --enable-threadsafe --with-system-nspr.
But now it fails with this error message :
clone.o jscntxt.o jscompartment.o jsdate.o jsdbgapi.o jsdhash.o jsdtoa.o jsemit.o jsexn.o jsfriendapi.o jsfun.o jsgc.o jsgcchunk.o jsgcstats.o jshash.o jsinterp.o jsinvoke.o jsiter.o jslock.o jslog2.o jsmath.o jsnativestack.o jsnum.o jsobj.o json.o jsopcode.o jsparse.o jsproxy.o jsprf.o jsprobes.o jspropertycache.o jspropertytree.o jsreflect.o jsregexp.o jsscan.o jsscope.o jsscript.o jsstr.o jstypedarray.o jsutil.o jswrapper.o jsxdrapi.o jsxml.o prmjtime.o sharkctl.o jstracer.o Assembler.o Allocator.o CodeAlloc.o Containers.o Fragmento.o LIR.o njconfig.o RegAlloc.o avmplus.o Nativei386.o jsbuiltins.o VMPI.o Writer.o MethodJIT.o StubCalls.o Compiler.o FrameState.o FastArithmetic.o FastOps.o StubCompiler.o MonoIC.o PolyIC.o ImmutableSync.o InvokeHelpers.o Retcon.o TrampolineCompiler.o checks.o conversions.o diy-fp.o v8-dtoa.o fast-dtoa.o platform.o utils.o Assertions.o ExecutableAllocatorPosix.o ExecutableAllocatorWin.o ExecutableAllocatorOS2.o ExecutableAllocator.o ARMAssembler.o Logging.o MacroAssemblerARM.o MacroAssemblerX86Common.o RegexCompiler.o RegexJIT.o pcre_compile.o pcre_exec.o pcre_tables.o pcre_xclass.o pcre_ucp_searchfuncs.o jsperf.o pm_linux.o
ranlib libjs_static.a make[1]: * No rule to make target
-lpthread', needed by
libmozjs185.so'. Stop. make[1]: Leaving directory `/tmp/nix-build-spidermonkey-185-1.0.0.drv-0/js-1.8.5/js/src' make: * [default] Error 2 builder for/nix/store/hr7mk3w4fpsi8qmnj2y7j84766kk7l8f-spidermonkey-185-1.0.0.drv' failed with exit code 2 error: build of
/nix/store/hr7mk3w4fpsi8qmnj2y7j84766kk7l8f-spidermonkey-185-1.0.0.drv' failed