libPJutil fails to compile

Issue #2 resolved
Christopher Moody created an issue

Originally reported on Google Code with ID 2 ``` What steps will reproduce the problem? 1. Installed Boost and Blitz (along with the other reqs) via synaptic with at least the versions needed 2. export CPPFLAGS=-I/usr/include and LDFLAGS=-L/usr/lib (this is where synaptic reports the reqs are installed) 3. run ./configure in libPJutil-1.10 4. run make

What is the expected output? What do you see instead? Quite a few files compile, but solver.cc doesn't. Errors concerning cout and iostream.h not being found (I've attached the output to the end) so I don't think it's a problem with installing the reqs via synaptic.

I'll try to do this all from the source soon, and see if the problem goes away.

What version of the product are you using? On what operating system? Latest, with blitz 1:0.9-9 and boost 1.34.1. Ubuntu 9.04

Please provide any additional information below.

libPJutil-1.10 > make /bin/bash ./libtool --tag=CXX --mode=compile g++ -DPACKAGE_NAME=\"libPJutil\" -DPACKAGE_TARNAME=\"libpjutil\" -DPACKAGE_VERSION=\"1.9\" -DPACKAGE_STRING=\"libPJutil\ 1.9\" -DPACKAGE_BUGREPORT=\"Patrik\ Jonsson\ \<sunrise@familjenjonsson.org\>\" -DPACKAGE=\"libPJutil\" -DVERSION=\"1.9\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_NCEG_RESTRICT_EGCS=/\*\*/ -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_STDBOOL_H=1 -DHAVE_LIBBLITZ=1 -DHAVE_BLITZ_ARRAY_H=1 -DHAVE_BLITZ_TINYVEC_H=1 -DHAVE_BLITZ_TINYVEC_ET_H=1 -DHAVE_RANDOM_UNIFORM_H=1 -DHAVE_LIBCFITSIO=1 -DHAVE_FITSIO_H=1 -DHAVE_LIBCCFITS=1 -DHAVE_CCFITS_CCFITS=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -I. -I/usr/include/ -g -O2 -MT solver.lo -MD -MP -MF .deps/solver.Tpo -c -o solver.lo solver.cc libtool: compile: g++ -DPACKAGE_NAME=\"libPJutil\" -DPACKAGE_TARNAME=\"libpjutil\" -DPACKAGE_VERSION=\"1.9\" "-DPACKAGE_STRING=\"libPJutil 1.9\"" "-DPACKAGE_BUGREPORT=\"Patrik Jonsson <sunrise@familjenjonsson.org>\"" -DPACKAGE=\"libPJutil\" -DVERSION=\"1.9\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" "-DHAVE_NCEG_RESTRICT_EGCS=//" -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_STDBOOL_H=1 -DHAVE_LIBBLITZ=1 -DHAVE_BLITZ_ARRAY_H=1 -DHAVE_BLITZ_TINYVEC_H=1 -DHAVE_BLITZ_TINYVEC_ET_H=1 -DHAVE_RANDOM_UNIFORM_H=1 -DHAVE_LIBCFITSIO=1 -DHAVE_FITSIO_H=1 -DHAVE_LIBCCFITS=1 -DHAVE_CCFITS_CCFITS=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -I. -I/usr/include/ -g -O2 -MT solver.lo -MD -MP -MF .deps/solver.Tpo -c solver.cc -fPIC -DPIC -o .libs/solver.o solver.cc:11:22: error: iostream.h: No such file or directory solver.cc: In member function ‘double solver::Solve(double, ...)’: solver.cc:54: error: ‘cout’ was not declared in this scope solver.cc:62: error: ‘cout’ was not declared in this scope make: * [solver.lo] Error 1

```

Reported by `juxtaposicion` on 2010-10-14 02:46:32

Comments (5)

  1. Christopher Moody reporter

    ``` It looks like the variable CC='gcc' and CPP='gcc -E', CXX='g++' . Does that make sense?

    ```

    Reported by `juxtaposicion` on 2010-10-14 03:18:11

  2. Former user Account Deleted

    ``` I can see it's g++ in the make output, but what version are you running?

    My bet would be that you have a new version and they've finally turned off the deprecated libstdc++ .h header files. Should be trivial to fix, just change to <iostream> and using namespace std;

    ```

    Reported by `patrikatfamiljenjonsson` on 2010-10-20 18:31:04

  3. Tyler Quinn

    ``` I also ran into this problem with version 11 of the Intel compiler. My fix was as above: change to <iostream> and add "using namespace std;" ```

    Reported by `trquinn` on 2011-05-29 01:59:28

  4. Former user Account Deleted

    ``` Fixed as of r281.

    ```

    Reported by `sunrise@familjenjonsson.org` on 2011-06-27 17:27:33 - Status changed: `Fixed`

  5. Log in to comment