minaco2 / distcc

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

build failed on OpenSolaris env #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have illumian distr - based on illumos (fork OpenSolaris)

I have built GCC44 to /usr/gcc/4.4

I tried to configure and build.

# CC=/usr/gcc/4.4/bin/gcc CXX=/usr/gcc/4.4/bin/g++ ./configure --prefix=/usr 
--without-avahi
.....

# gmake
.....
/usr/gcc/4.4/bin/gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/usr/etc\"" 
-DPKGDATADIR="\"/usr/share/distcc\"" -Isrc -I"./src" -I"./lzo"  -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 -D_REENTRANT -pthreads -o src/io.o -c 
src/io.c
src/io.c: In function `tcp_cork_sock':
src/io.c:268: error: `SOL_TCP' undeclared (first use in this function)
src/io.c:268: error: (Each undeclared identifier is reported only once
src/io.c:268: error: for each function it appears in.)
gmake: *** [src/io.o] Error 1

How to fix it ?

I couldn't found SOL_TCP in headers on my system.

Best regards,
-Igor

Original issue reported on code.google.com by ikozhuk...@gmail.com on 23 Jan 2012 at 1:53

GoogleCodeExporter commented 9 years ago
I think the following patch should fix it.

Index: io.c
===================================================================
--- io.c    (revision 750)
+++ io.c    (working copy)
@@ -261,7 +261,7 @@
  **/
 int tcp_cork_sock(int POSSIBLY_UNUSED(fd), int POSSIBLY_UNUSED(corked))
 {
-#ifdef TCP_CORK
+#if defined(TCP_CORK) && defined(SOL_TCP)
     if (!dcc_getenv_bool("DISTCC_TCP_CORK", 1))
         return 0;

Original comment by fergus.h...@gmail.com on 25 Jan 2012 at 11:31

GoogleCodeExporter commented 9 years ago
thanks, it is foxed my problem with compilation on illumos (OpenSolaris) based 
system.
you can integrate your fix.

Original comment by ikozhuk...@gmail.com on 25 Jan 2012 at 7:02

GoogleCodeExporter commented 9 years ago
Fixed in revision 752.

Original comment by fergus.h...@gmail.com on 25 Jan 2012 at 7:10