Opened 15 years ago

Closed 14 years ago

#20902 closed defect (worksforme)

distcc 3.1 fails to build on 10.6

Reported by: luis.beca@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc: kiwi.2008@…, jmdeldin@…, nerdling (Jeremy Lavergne), drkp (Dan Ports)
Port: distcc

Description

distcc 3.1 fails to build on Snow Leopard. See attached build log.

Attachments (8)

distcc-buildlog-10.6.txt (23.8 KB) - added by luis.beca@… 15 years ago.
macports-20902-a.diff (1.5 KB) - added by kiwi.2008@… 15 years ago.
Partial patch
Portfile-snowleopard.diff (358 bytes) - added by kiwi.2008@… 15 years ago.
Portfile patch for Snow Leopard
patch-avoid-builtin-strndup.diff (550 bytes) - added by kiwi.2008@… 15 years ago.
Avoid conflict with builtin strndup function
patch-avoid-compile-warnings.diff (789 bytes) - added by kiwi.2008@… 15 years ago.
Avoid gcc 4.2.1 compiler warnings
Portfile-symlinkdir.diff (561 bytes) - added by kiwi.2008@… 15 years ago.
Provide symlink dir (ala ccache port)
main.log (80.8 KB) - added by nerdling (Jeremy Lavergne) 15 years ago.
leopard build log
main.2.log (78.8 KB) - added by nerdling (Jeremy Lavergne) 15 years ago.
failed leopard build without patches

Download all attachments as: .zip

Change History (27)

Changed 15 years ago by luis.beca@…

Attachment: distcc-buildlog-10.6.txt added

comment:1 Changed 15 years ago by kiwi.2008@…

Cc: kiwi.2008@… added

Cc Me!

comment:2 Changed 15 years ago by kiwi.2008@…

[First time poster]

Partial patch attached. Removes several build errors, but I'm not sure about the following one: 'strndup' is not in /usr/include anywhere on Snow Leopard ...

/usr/bin/gcc-4.2 -I/opt/local/include -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/opt/local/etc\"" -DPKGDATADIR="\"/opt/local/share/distcc\"" -Isrc -I"./src" -I"./lzo"  -Werror -O2 -arch x86_64 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized -D_THREAD_SAFE  -o src/daemon.o -c src/daemon.c
cc1: warnings being treated as errors
src/hosts.c:135: warning: declaration of 'strndup' shadows a built-in function
make: *** [src/hosts.o] Error 1
make: *** Waiting for unfinished jobs....

Removing the function declaration gives you something similar

/usr/bin/gcc-4.2 -I/opt/local/include -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/opt/local/etc\"" -DPKGDATADIR="\"/opt/local/share/distcc\"" -Isrc -I"./src" -I"./lzo"  -Werror -O2 -arch x86_64 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized -D_THREAD_SAFE  -o src/hosts.o -c src/hosts.c
cc1: warnings being treated as errors
src/hosts.c: In function ‘dcc_parse_hosts’:
src/hosts.c:538: warning: implicit declaration of function ‘strndup’
src/hosts.c:538: warning: incompatible implicit declaration of built-in function ‘strndup’
make: *** [src/hosts.o] Error 1

Changed 15 years ago by kiwi.2008@…

Attachment: macports-20902-a.diff added

Partial patch

comment:3 Changed 15 years ago by jmdeldin@…

Cc: jmdeldin@… added

Cc Me!

Changed 15 years ago by kiwi.2008@…

Attachment: Portfile-snowleopard.diff added

Portfile patch for Snow Leopard

Changed 15 years ago by kiwi.2008@…

Avoid conflict with builtin strndup function

Changed 15 years ago by kiwi.2008@…

Avoid gcc 4.2.1 compiler warnings

comment:4 Changed 15 years ago by kiwi.2008@…

The files

  • Portfile-snowleopard.diff
  • patch-avoid-builtin-strndup.diff
  • patch-avoid-compile-warnings.diff

fix build problems on Snow Leopard

Changed 15 years ago by kiwi.2008@…

Attachment: Portfile-symlinkdir.diff added

Provide symlink dir (ala ccache port)

comment:5 Changed 15 years ago by kyle.tarplee@…

Is anyone going to commit these changes? It seems like you have fixes but they do no good until the portfile is updated, right?

comment:6 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:7 Changed 15 years ago by drkp (Dan Ports)

Cc: dports@… added

Cc Me!

comment:8 Changed 15 years ago by drkp (Dan Ports)

I can confirm that the patch provided in the following files works for me:

  • Portfile-snowleopard.diff
  • patch-avoid-builtin-strndup.diff
  • patch-avoid-compile-warnings.diff

Can we get these committed?

comment:9 in reply to:  8 ; Changed 15 years ago by mf2k (Frank Schima)

Replying to dports@…:

I can confirm that the patch provided in the following files works for me:

  • Portfile-snowleopard.diff
  • patch-avoid-builtin-strndup.diff
  • patch-avoid-compile-warnings.diff

Can we get these committed?

I committed these 3 in r62129. Can someone with Leopard test this please?

Also, I am not clear what the patch Portfile-symlinkdir.diff is for? If it's for the ccache port, then another ticket should be opened for it so it can be assigned to the maintainer of that port.

comment:10 in reply to:  9 ; Changed 15 years ago by nerdling (Jeremy Lavergne)

Replying to macsforever2000@…:

I committed these 3 in r62129. Can someone with Leopard test this please?

I get a build failure on Leopard with trunk. See attached.

Changed 15 years ago by nerdling (Jeremy Lavergne)

Attachment: main.log added

leopard build log

comment:11 in reply to:  10 ; Changed 15 years ago by nerdling (Jeremy Lavergne)

Replying to snc@…:

I get a build failure on Leopard with trunk. See attached.

Of course, the changes might not be in my source tree yet …

comment:12 in reply to:  11 ; Changed 15 years ago by nerdling (Jeremy Lavergne)

Replying to snc@…:

Of course, the changes might not be in my source tree yet …

The patches were in place and ran.

comment:13 in reply to:  12 ; Changed 15 years ago by mf2k (Frank Schima)

Replying to snc@…:

The patches were in place and ran.

So did it compile on Leopard before the patches? If so, then I will apply them only in darwin 10.

comment:14 in reply to:  13 Changed 15 years ago by drkp (Dan Ports)

Replying to macsforever2000@…:

So did it compile on Leopard before the patches? If so, then I will apply them only in darwin 10.

I wouldn't think these patches could cause this error.

Is this a +universal problem?

comment:15 in reply to:  9 Changed 15 years ago by drkp (Dan Ports)

Replying to macsforever2000@…:

Also, I am not clear what the patch Portfile-symlinkdir.diff is for? If it's for the ccache port, then another ticket should be opened for it so it can be assigned to the maintainer of that port.

No, I think it's intended for this port. It creates a directory /opt/local/libexec/distcc with symlinks like 'gcc', 'g++' etc so that you can add it to your PATH and have 'gcc' automatically invoke distcc. ccache does something similar already.

comment:16 in reply to:  13 Changed 15 years ago by nerdling (Jeremy Lavergne)

Replying to macsforever2000@…:

So did it compile on Leopard before the patches? If so, then I will apply them only in darwin 10.

No, build was unsuccessful for me when I axed the patchfiles from the Portfile.

Replying to dports@…:

Is this a +universal problem?

No defaults variants are set on this system—+universal was not used.

Changed 15 years ago by nerdling (Jeremy Lavergne)

Attachment: main.2.log added

failed leopard build without patches

comment:17 Changed 15 years ago by anshuman.aggarwal@…

Is this ever going to be committed for snow leopard?

comment:18 Changed 14 years ago by drkp (Dan Ports)

So what's the status of this one?

I gather that it's broken under 10.5?

Is anyone having trouble with 10.6? It seems to work for me, though doesn't build universal.

comment:19 Changed 14 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

No response; seems fine to me; closing.

Note: See TracTickets for help on using tickets.