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

Ubuntu compile issue #5

Closed
robsyme opened this issue Sep 5, 2011 · 3 comments
Closed

Ubuntu compile issue #5

robsyme opened this issue Sep 5, 2011 · 3 comments

Comments

@robsyme
Copy link
Contributor

robsyme commented Sep 5, 2011

Hi, I'm trying to install sonLib for Cactus on an ubuntu system.

make all fails with:

$ make all
cd externalTools && make all
make[1]: Entering directory `/home/rob/src/sonLib/externalTools'
cd cutest && make all
make[2]: Entering directory `/home/rob/src/sonLib/externalTools/cutest'
gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm  -c CuTest.c
ar rc cuTest.a *.o
ranlib cuTest.a
rm -f *.o
mv cuTest.a ../../lib/
cp CuTest.h ../../lib/
make[2]: Leaving directory `/home/rob/src/sonLib/externalTools/cutest'
make[1]: Leaving directory `/home/rob/src/sonLib/externalTools'
cd C && make all
make[1]: Entering directory `/home/rob/src/sonLib/C'
cp inc/*.h ../lib/
gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm      -I inc -I ../lib/ -c impl/*.c
cc1: warnings being treated as errors
impl/commonC.c: In function ‘getTempFile’:
impl/commonC.c:842:11: error: ignoring return value of ‘tmpnam’, declared with attribute warn_unused_result
cc1: warnings being treated as errors
impl/stSafeC.c: In function ‘stSafeCErr’:
impl/stSafeC.c:26:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
impl/stSafeC.c:27:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[1]: *** [../lib/sonLib.a] Error 1
make[1]: Leaving directory `/home/rob/src/sonLib/C'
make: *** [cP] Error 2

gcc version is:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 

Is this something I can fix from here? My apologies I'm missing something obvious, or if this doesn't warrant filing a new issue.

@benedictpaten
Copy link
Owner

I see.. we've dealt with this issue on the dev branch, you could check
that out. We'll push this back to the head shortly, thanks for the
heads up,

Benedict

On Mon, Sep 5, 2011 at 9:38 AM, robsyme
reply@reply.github.com
wrote:

Hi, I'm trying to install sonLib for Cactus on an ubuntu system.

make all fails with:

   $ make all
   cd externalTools && make all
   make[1]: Entering directory /home/rob/src/sonLib/externalTools'    cd cutest && make all    make[2]: Entering directory/home/rob/src/sonLib/externalTools/cutest'
   gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm  -c CuTest.c
   ar rc cuTest.a _.o
   ranlib cuTest.a
   rm -f *.o
   mv cuTest.a ../../lib/
   cp CuTest.h ../../lib/
   make[2]: Leaving directory /home/rob/src/sonLib/externalTools/cutest'    make[1]: Leaving directory/home/rob/src/sonLib/externalTools'
   cd C && make all
   make[1]: Entering directory /home/rob/src/sonLib/C'    cp inc/_.h ../lib/    gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm      -I inc -I ../lib/ -c impl/_.c    cc1: warnings being treated as errors    impl/commonC.c: In function ‘getTempFile’:    impl/commonC.c:842:11: error: ignoring return value of ‘tmpnam’, declared with attribute warn_unused_result    cc1: warnings being treated as errors    impl/stSafeC.c: In function ‘stSafeCErr’:    impl/stSafeC.c:26:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result    impl/stSafeC.c:27:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result    make[1]: *_\* [../lib/sonLib.a] Error 1    make[1]: Leaving directory /home/rob/src/sonLib/C'
   make: *** [cP] Error 2

gcc version is:

   $ gcc -v
   Using built-in specs.
   COLLECT_GCC=gcc
   COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
   Target: x86_64-linux-gnu
   Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
   Thread model: posix
   gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Is this something I can fix from here? My apologies I'm missing something obvious, or if this doesn't warrant filing a new issue.

Reply to this email directly or view it on GitHub:
#5

@robsyme
Copy link
Contributor Author

robsyme commented Sep 5, 2011

Ah. I should have pulled in the dev branch before complaining. Sorry!

On 5 Sep 2011 20:15, "benedictpaten" <
reply@reply.github.com>
wrote:

I see.. we've dealt with this issue on the dev branch, you could check
that out. We'll push this back to the head shortly, thanks for the
heads up,

Benedict

On Mon, Sep 5, 2011 at 9:38 AM, robsyme
reply@reply.github.com
wrote:

Hi, I'm trying to install sonLib for Cactus on an ubuntu system.

make all fails with:

$ make all
cd externalTools && make all
make[1]: Entering directory /home/rob/src/sonLib/externalTools' cd cutest && make all make[2]: Entering directory /home/rob/src/sonLib/externalTools/cutest'
gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm -c
CuTest.c
ar rc cuTest.a _.o
ranlib cuTest.a
rm -f *.o
mv cuTest.a ../../lib/
cp CuTest.h ../../lib/
make[2]: Leaving directory /home/rob/src/sonLib/externalTools/cutest' make[1]: Leaving directory/home/rob/src/sonLib/externalTools'
cd C && make all
make[1]: Entering directory /home/rob/src/sonLib/C' cp inc/_.h ../lib/ gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm -I inc -I ../lib/ -c impl/_.c cc1: warnings being treated as errors impl/commonC.c: In function getTempFile: impl/commonC.c:842:11: error: ignoring return value of tmpnam, declared with attribute warn_unused_result cc1: warnings being treated as errors impl/stSafeC.c: In function stSafeCErr: impl/stSafeC.c:26:10: error: ignoring return value of write, declared with attribute warn_unused_result impl/stSafeC.c:27:10: error: ignoring return value of write, declared with attribute warn_unused_result make[1]: *_\* [../lib/sonLib.a] Error 1 make[1]: Leaving directory /home/rob/src/sonLib/C'
make: *** [cP] Error 2

gcc version is:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.5 --enable-shared --enable-multiarch
--with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.5
--libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Is this something I can fix from here? My apologies I'm missing something
obvious, or if this doesn't warrant filing a new issue.

Reply to this email directly or view it on GitHub:
#5

Reply to this email directly or view it on GitHub:
#5 (comment)

@glennhickey
Copy link
Collaborator

Hi Rob,

A quick fix would be to remove the -Werror flag from your compiler
options. (can be done by deleting it from sonLib/include.mk)

The problem seems to be that your compiler checks to see if the return
values from the write and tmpnam system calls are used, and emits a
warning when they aren't. The warning gets turned into an error with
-Werror which breaks the compile. These warnings must be a novel
'feature' since your gcc is newer than ours (4.1). We'll get the code
patched in git soon.

thanks for your feedback
-Glenn

On Mon, Sep 5, 2011 at 1:38 AM, robsyme
reply@reply.github.com
wrote:

Hi, I'm trying to install sonLib for Cactus on an ubuntu system.

make all fails with:

   $ make all
   cd externalTools && make all
   make[1]: Entering directory /home/rob/src/sonLib/externalTools'    cd cutest && make all    make[2]: Entering directory/home/rob/src/sonLib/externalTools/cutest'
   gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm  -c CuTest.c
   ar rc cuTest.a _.o
   ranlib cuTest.a
   rm -f *.o
   mv cuTest.a ../../lib/
   cp CuTest.h ../../lib/
   make[2]: Leaving directory /home/rob/src/sonLib/externalTools/cutest'    make[1]: Leaving directory/home/rob/src/sonLib/externalTools'
   cd C && make all
   make[1]: Entering directory /home/rob/src/sonLib/C'    cp inc/_.h ../lib/    gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm      -I inc -I ../lib/ -c impl/_.c    cc1: warnings being treated as errors    impl/commonC.c: In function ‘getTempFile’:    impl/commonC.c:842:11: error: ignoring return value of ‘tmpnam’, declared with attribute warn_unused_result    cc1: warnings being treated as errors    impl/stSafeC.c: In function ‘stSafeCErr’:    impl/stSafeC.c:26:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result    impl/stSafeC.c:27:10: error: ignoring return value of ‘write’, declared with attribute warn_unused_result    make[1]: *_\* [../lib/sonLib.a] Error 1    make[1]: Leaving directory /home/rob/src/sonLib/C'
   make: *** [cP] Error 2

gcc version is:

   $ gcc -v
   Using built-in specs.
   COLLECT_GCC=gcc
   COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
   Target: x86_64-linux-gnu
   Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
   Thread model: posix
   gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

Is this something I can fix from here? My apologies I'm missing something obvious, or if this doesn't warrant filing a new issue.

Reply to this email directly or view it on GitHub:
#5

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

No branches or pull requests

3 participants