【发布时间】:2014-07-01 19:27:11
【问题描述】:
当我发出类似(例如)make -j 4 的命令时,我收到以下错误:
warning: jobserver unavailable: using -j1. Add `+' to parent make rule
我在 RHEL6 下使用来自 Scientific Linux 6 的开发者工具包:
$ 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)
我安装了libmpc 0.8.3:
$ rpm -qa | grep mpc
libmpcdec-1.2.6-6.1.el6.x86_64
libmpc-0.8-3.el6.x86_64
有没有办法解决我的项目的 makefile 或 gcc 以确定导致警告的原因并修复它?在通过 Clang/LLVM 从 OS X 构建时,我似乎不需要将 + 符号添加到规则中。对警告文本的 Google 搜索没有返回太多显然有用的信息。
【问题讨论】:
-
问题不在于 GCC、Clang 或 LLVM。它是
make,它是一个完全独立的程序。我们需要查看的信息是 makefile 中的哪个命令导致生成该警告:这将是对make本身的递归调用。假设您在 OSX 和 Linux 上都使用 GNU make,并且您使用相同的-j标志调用两个版本,并且您用于构建的 makefile 是相同的,我不知道为什么会这样它可以在一个系统上运行,但不能在另一个系统上运行。我假设您在两者上都使用相同的外壳(例如,不是csh)等等。 -
我在 RHEL6 和 OS X 10.9.2 系统上都使用了
make3.81 和bash。似乎与该问题相关的一行是我在哪里创建了一个静态bzip2库: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我有几个其他第三方库,我将它们构建到静态库中,它们也显示相同的警告消息。跨度>
标签: gcc makefile rhel rhel-scl