New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20902 (closed defect: worksforme)

Opened 4 years ago

Last modified 2 years ago

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@…, snc@…, dports@…
Port: distcc

Description

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

Attachments

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

Change History

Changed 4 years ago by luis.beca@…

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

  • Cc kiwi.2008@… added

Cc Me!

comment:2 Changed 4 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 4 years ago by kiwi.2008@…

Partial patch

comment:3 Changed 4 years ago by jmdeldin@…

  • Cc jmdeldin@… added

Cc Me!

Changed 4 years ago by kiwi.2008@…

Portfile patch for Snow Leopard

Changed 4 years ago by kiwi.2008@…

Avoid conflict with builtin strndup function

Changed 4 years ago by kiwi.2008@…

Avoid gcc 4.2.1 compiler warnings

comment:4 Changed 4 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 4 years ago by kiwi.2008@…

Provide symlink dir (ala ccache port)

comment:5 Changed 4 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 4 years ago by snc@…

  • Cc snc@… added

Cc Me!

comment:7 Changed 3 years ago by dports@…

  • Cc dports@… added

Cc Me!

comment:8 follow-up: ↓ 9 Changed 3 years ago by 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?

comment:9 in reply to: ↑ 8 ; follow-ups: ↓ 10 ↓ 15 Changed 3 years ago by macsforever2000@…

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 ; follow-up: ↓ 11 Changed 3 years ago by snc@…

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 3 years ago by snc@…

leopard build log

comment:11 in reply to: ↑ 10 ; follow-up: ↓ 12 Changed 3 years ago by snc@…

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 ; follow-up: ↓ 13 Changed 3 years ago by snc@…

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 ; follow-ups: ↓ 14 ↓ 16 Changed 3 years ago by macsforever2000@…

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 3 years ago by dports@…

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 3 years ago by dports@…

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 3 years ago by snc@…

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 3 years ago by snc@…

failed leopard build without patches

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

Is this ever going to be committed for snow leopard?

comment:18 Changed 3 years ago by dports@…

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 2 years ago by jmr@…

  • Status changed from new to closed
  • Resolution set to worksforme

No response; seems fine to me; closing.

Note: See TracTickets for help on using tickets.