minaco2 / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Build failure on vanilla Ubuntu 8.10 #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Attempting to build distcc from source.  

distcc 3.1
Ubuntu 8.10

$ tar xjvf distcc-3.1.tar.bz2
$ cd distcc-3.1

Tried the simple
  ./configure && make && sudo make install

Warning are treated as errors so multiple failure.  You can hack the make
file to turn this off but other errors occur 

gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/usr/local/etc\""
-DPKGDATADIR="\"/usr/local/share/distcc\"" -Isrc -I"./src" -I"./lzo"
-I"./popt" -Werror -g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wnested-externs -Wmissing-declarations
-Wuninitialized -pthread -o src/emaillog.o -c src/emaillog.c
cc1: warnings being treated as errors
src/emaillog.c: In function ‘dcc_add_file_to_log_email’:
src/emaillog.c:92: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result
src/emaillog.c:93: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result
src/emaillog.c:94: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result
src/emaillog.c:98: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result

... etc.

Regenerating configure results in a similar set of errors but starting in a
different file.

$ sh autogen.sh
$ ./configure
$ make

cc1: warnings being treated as errors
src/trace.c: In function ‘rs_logger_file’:
src/trace.c:330: error: ignoring return value of ‘write’, declared with
attribute warn_unused_result
make: *** [src/trace.o] Error 1

Original issue reported on code.google.com by rrans...@gmail.com on 3 Dec 2008 at 11:31

GoogleCodeExporter commented 9 years ago
Have you tried

  ./configure --disable-Werror
  make

?

Original comment by fergus.h...@gmail.com on 3 Dec 2008 at 11:39

GoogleCodeExporter commented 9 years ago
Just did.  error -> warnings.  Has a problem finding Python.h

if test -z "/usr/bin/python2.5"; then   \
      echo "Not building include-server: No suitable python found"; \
    else                        \
      mkdir -p "./_include_server" &&      \
      DISTCC_VERSION="3.1"          \
      SRCDIR="."                            \
      CFLAGS="-g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Wmissing-declarations -Wuninitialized -pthread
-Wno-missing-prototypes -Wno-missing-declarations -Wno-write-strings
-Wp,-U_FORTIFY_SOURCE"           \
      CPPFLAGS="-DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/usr/local/etc\""
-DPKGDATADIR="\"/usr/local/share/distcc\"" -Isrc -I"./src" -I"./lzo" 
-I"./popt""    
                   \
      /usr/bin/python2.5 "./include_server/setup.py" \
          build                     \
            --build-base="./_include_server"  \
            --build-temp="./_include_server"; \
    fi
setup.py: PYTHON_CFLAGS must be defined.
running build
running build_py
running build_ext
building 'include_server.distcc_pump_c_extensions' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes
-g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-Wmissing-declarations -Wuninitialized -pthread -Wno-missing-prototypes
-Wno-missing-declarations -Wno-write-strings -Wp,-U_FORTIFY_SOURCE 
-DHAVE_CONFIG_H
-D_GNU_SOURCE -DSYSCONFDIR=/usr/local/etc -DPKGDATADIR=/usr/local/share/distcc 
-Isrc
-I./src -I./lzo -I./popt -fPIC -D_GNU_SOURCE=1 -Isrc -I./src -I./lzo -I./popt
-I/usr/include/python2.5 -c
/home/rranslam/wrs/tools/distcc-3.1/include_server/c_extensions/distcc_pump_c_ex
tensions_module.c
-o
./_include_server/home/rranslam/wrs/tools/distcc-3.1/include_server/c_extensions
/distcc_pump_c_extensions_module.o
/home/rranslam/wrs/tools/distcc-3.1/include_server/c_extensions/distcc_pump_c_ex
tensions_module.c:24:20:
error: Python.h: No such file or directory
/home/rranslam/wrs/tools/distcc-3.1/

Original comment by rrans...@gmail.com on 3 Dec 2008 at 11:47

GoogleCodeExporter commented 9 years ago
Looks like there is a fix for "PYTHON_CFLAGS must be defined."  I can pull from 
the
head and give it a spin

Original comment by rrans...@gmail.com on 4 Dec 2008 at 12:07

GoogleCodeExporter commented 9 years ago
You can just ignore the message about PYTHON_CFLAGS.  It's a spurious message.  
The
fix just makes the message go away.

Python.h is supposed to be part of your Python installation.
You need to have the right packages installed in order to build distcc from 
source.
Try "apt-get install python2.4-dev"?

Let us know if that solves the problem.

Cheers,
  Fergus.

Original comment by fergus.h...@gmail.com on 9 Dec 2008 at 1:18

GoogleCodeExporter commented 9 years ago
darn though i had python-dev installed... that was it. Thanks

to recap, for ubuntu-8.10 do

  sudo apt-get install python2.5-dev
  tar xjvf distcc-3.1.tar.bz2
  cd distcc-3.1
  ./autogen.sh
  ./configure --disable-Werror && make && sudo make install

  ready to go

Original comment by rrans...@gmail.com on 10 Dec 2008 at 4:57

GoogleCodeExporter commented 9 years ago
I'll update the installation instructions.
http://code.google.com/p/distcc/source/detail?r=632#

Original comment by fergus.h...@gmail.com on 10 Dec 2008 at 6:41

GoogleCodeExporter commented 9 years ago
Documentation updated in revision 634.

Original comment by fergus.h...@gmail.com on 10 Dec 2008 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by fergus.h...@gmail.com on 10 Dec 2008 at 8:39

GoogleCodeExporter commented 9 years ago
If python is truly optional, as the install docs indicate, then your solution 
really
doesn't fix the problem.  The configure script should detect that the python dev
tools (like Python.h) are missing, print a big warning message, and then 
proceed as
if python were completely missing.

I'm having the same problem described, but I don't have root access, nor do I 
want to
try to install the python dev tools by hand in my home dir just so I can compile
this.  Is there some way to make the configure script think that python isn't 
installed?

Original comment by andrew.s...@gmail.com on 21 Mar 2009 at 10:38

GoogleCodeExporter commented 9 years ago
In general it's a good idea to have Python, including the Python dev tools; you 
need
that for "pump" mode, which has much better performance in a lot of cases.

But, if you're really keen on not using Python...
You might be able to get configure to not detect Python by setting PATH to 
something
that doesn't contain "python*", e.g.

   mkdir $HOME/usr_bin
   ln -s /usr/bin/* $HOME/usr_bin
   rm -f ~/usr_bin/python*
   PATH=$(echo "$PATH" | sed "s@/usr/bin@$HOME/usr_bin)

Alternatively, please feel free to make a patch to configure.ac to add a
--without_python option, and send it to the distcc-patches list.

Original comment by fergus.h...@gmail.com on 23 Mar 2009 at 6:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think it's common to have python installed, while without python-dev. 
Thus,what will distcc be if python-dev is missing while python existing? 
It involves the dependency of python and python-dev from distcc.

Original comment by compan...@gmail.com on 8 Jun 2012 at 12:10

GoogleCodeExporter commented 9 years ago
I think the INSTALL file explains the dependencies on other packages.

Original comment by fergus.h...@gmail.com on 8 Jun 2012 at 3:28

GoogleCodeExporter commented 9 years ago
Thanks. I forget to check that. : - )

Original comment by compan...@gmail.com on 11 Jun 2012 at 1:58