New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20902 (closed defect: worksforme)

Opened 2 years ago

Last modified 15 months 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 Download (23.8 KB) - added by luis.beca@… 2 years ago.
macports-20902-a.diff Download (1.5 KB) - added by kiwi.2008@… 2 years ago.
Partial patch
Portfile-snowleopard.diff Download (358 bytes) - added by kiwi.2008@… 2 years ago.
Portfile patch for Snow Leopard
patch-avoid-builtin-strndup.diff Download (0.5 KB) - added by kiwi.2008@… 2 years ago.
Avoid conflict with builtin strndup function
patch-avoid-compile-warnings.diff Download (0.8 KB) - added by kiwi.2008@… 2 years ago.
Avoid gcc 4.2.1 compiler warnings
Portfile-symlinkdir.diff Download (0.5 KB) - added by kiwi.2008@… 2 years ago.
Provide symlink dir (ala ccache port)
main.log Download (80.8 KB) - added by snc@… 2 years ago.
leopard build log
main.2.log Download (78.8 KB) - added by snc@… 2 years ago.
failed leopard build without patches

Change History

Changed 2 years ago by luis.beca@…

  Changed 2 years ago by kiwi.2008@…

  • cc kiwi.2008@… added

Cc Me!

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

Partial patch

  Changed 2 years ago by jmdeldin@…

  • cc jmdeldin@… added

Cc Me!

Changed 2 years ago by kiwi.2008@…

Portfile patch for Snow Leopard

Changed 2 years ago by kiwi.2008@…

Avoid conflict with builtin strndup function

Changed 2 years ago by kiwi.2008@…

Avoid gcc 4.2.1 compiler warnings

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

Provide symlink dir (ala ccache port)

  Changed 2 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?

  Changed 2 years ago by snc@…

  • cc snc@… added

Cc Me!

  Changed 2 years ago by dports@…

  • cc dports@… added

Cc Me!

follow-up: ↓ 9   Changed 2 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?

in reply to: ↑ 8 ; follow-ups: ↓ 10 ↓ 15   Changed 2 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.

in reply to: ↑ 9 ; follow-up: ↓ 11   Changed 2 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 2 years ago by snc@…

leopard build log

in reply to: ↑ 10 ; follow-up: ↓ 12   Changed 2 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 …

in reply to: ↑ 11 ; follow-up: ↓ 13   Changed 2 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.

in reply to: ↑ 12 ; follow-ups: ↓ 14 ↓ 16   Changed 2 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.

in reply to: ↑ 13   Changed 2 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?

in reply to: ↑ 9   Changed 2 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.

in reply to: ↑ 13   Changed 2 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 2 years ago by snc@…

failed leopard build without patches

  Changed 22 months ago by anshuman.aggarwal@…

Is this ever going to be committed for snow leopard?

  Changed 21 months 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.

  Changed 15 months 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.