Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel build fails on OSX #27

Open
manugarg opened this issue Sep 26, 2014 · 2 comments
Open

Parallel build fails on OSX #27

manugarg opened this issue Sep 26, 2014 · 2 comments

Comments

@manugarg
Copy link
Owner

From [email protected] on May 28, 2013 14:25:48

What steps will reproduce the problem? 'make -j 4' on a dual-core MacBook Pro What is the expected output? What do you see instead? Expect:
    All tests were successful.
  Instead see:
    cc -dynamiclib -framework System -install_name /usr/lib/libpacparser.1.dylib -o libpacparser.1.dylib pacparser.o libjs.a -lm
    ld: malformed archive TOC entry for _printVal, offset 2032640 is beyond end of file 1318912 for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation) What version of the product are you using? On what operating system? pacparser version 1.3.1
  Mac OSX version 10.6.8 Please provide any additional information below. Different errors show up with different levels of parallelism

Original issue: http://code.google.com/p/pacparser/issues/detail?id=27

@ghost
Copy link

ghost commented Feb 18, 2015

A similar problem happens on Linux, too. This happens on Ubuntu, but I have also reproduced it on Gentoo both through an ebuild and on the command line just calling make directly. The actual failure is in one of a variety of places, not surprising with a concurrency problem. Sometimes the problem doesn't happen. When it does happen, I've noticed it happening most often from ld, something like:

gcc -o Linux_All_DBG.OBJ/jscpucfg Linux_All_DBG.OBJ/jscpucfg.o
Linux_All_DBG.OBJ/jscpucfg.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
make[2]: *** [Linux_All_DBG.OBJ/jscpucfg] Error 1

or:

gcc -o Linux_All_DBG.OBJ/jskwgen -fPIC -DHAVE_VA_COPY -DVA_COPY=__va_copy -Wall -Wno-format -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -fPIC  -DDEBUG -DDEBUG_fferrell -DEDITLINE -ILinux_All_DBG.OBJ   -lm Linux_All_DBG.OBJ/jskwgen.o
Linux_All_DBG.OBJ/jskwgen.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
make[2]: *** [Linux_All_DBG.OBJ/jskwgen] Error 1

but others were seen too, such as:

rm -f Linux_All_DBG.OBJ/jsautocfg.h
Linux_All_DBG.OBJ/jscpucfg > Linux_All_DBG.OBJ/jsautocfg.h
/bin/sh: 1: Linux_All_DBG.OBJ/jscpucfg: Text file busy
make[2]: *** [Linux_All_DBG.OBJ/jsautocfg.h] Error 2

@jirutka
Copy link

jirutka commented Jun 11, 2016

There’s indeed some weird concurrency problem. When I build it with defaults inside an Alpine Linux package, then it returns non-zero status on the last line of this snippet:

make -C src pactester
...
a - Linux_All_DBG.OBJ/jsxml.o
a - Linux_All_DBG.OBJ/prmjtime.o
echo Linux_All_DBG.OBJ/libjs.a
Linux_All_DBG.OBJ/libjs.a
make[2]: Leaving directory '/home/jirutjak/upstream-aports/testing/pacparser/src/pacparser-1.3.6/src/spidermonkey/js/src'
find js/src -name "jsautocfg.h" -exec cp {} js/src \;
touch js-buildstamp
cd js/src
find . -name "libjs.a" -exec cp {} .. \;
make[1]: Leaving directory '/home/jirutjak/upstream-aports/testing/pacparser/src/pacparser-1.3.6/src/spidermonkey'
make: Leaving directory '/home/jirutjak/upstream-aports/testing/pacparser/src/pacparser-1.3.6/src'
>>> ERROR: pacparser: all failed

If I specify -j1 for make, then it builds without problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants