1

When I issue a command like (for example) make -j 4, I get the following error:

warning: jobserver unavailable: using -j1.  Add `+' to parent make rule

I am using the developer toolkit from Scientific Linux 6 under RHEL6:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/builddir/build/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)

I have libmpc 0.8.3 installed:

$ rpm -qa | grep mpc
libmpcdec-1.2.6-6.1.el6.x86_64
libmpc-0.8-3.el6.x86_64

Is there a way to troubleshoot my project's makefile or gcc to determine what is causing the warning and fix it? I do not seem to need the + symbol added to rules when building from OS X via Clang/LLVM. Google searches on the warning text are not returning much information that is apparently useful.

Charles
  • 50,943
  • 13
  • 104
  • 142
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
  • 1
    It's not GCC, Clang, or LLVM that's the issue. It's `make`, which is an entirely separate program. The information we need to see is what command in the makefile is causing that warning to be generated: it will be a recursive invocation of `make` itself. Assuming you're using GNU make on both OSX and Linux, and you're invoking both versions with the same `-j` flag, and the makefiles you're using to build are the same, I don't know why it would be that it works on one system but not the other. I assume you're using the same shell on both (not `csh` for example), etc. – MadScientist May 14 '14 at 00:04
  • I'm using `make` 3.81 and `bash` on both the RHEL6 and OS X 10.9.2 systems. One line that appears to be related to the issue is where I make a static `bzip2` library: `cd third-party/bzip2-1.0.6 && make libbz2.a && cd /foo/bar && rm -f bzip2 && ln -s bzip2-1.0.6 third-party/bzip2` I have a couple other third-party libraries that I build into static libraries, which also show the same warning message. – Alex Reynolds May 14 '14 at 06:50

1 Answers1

3

Whenever you run make from inside a makefile you should always use the $(MAKE) variable. Never use the raw, literal command make.

MadScientist
  • 92,819
  • 9
  • 109
  • 136
  • @MadScientist any chance you could elaborate on "always use the `$(MAKE)`" https://stackoverflow.com/questions/50510278/makefile-why-always-use-make-instead-of-make? – Trevor Boyd Smith May 24 '18 at 13:11