1 | From: Ryan Schmidt <ryandesign@macports.org> |
---|
2 | Date: April 7, 2008 15:17:21 CDT |
---|
3 | To: Marco d'Itri <md@linux.it> |
---|
4 | Subject: whois 4.7.26 and -lcrypt on Mac OS X |
---|
5 | |
---|
6 | Hi Marco. I'm the maintainer of the whois port for MacPorts. I found that |
---|
7 | version 4.7.26 doesn't compile on Mac OS X: |
---|
8 | |
---|
9 | cc -DENABLE_NLS -I/opt/local/include -MM -MG *.c > Makefile.depend |
---|
10 | perl -w make_ip_del.pl < ip_del_list > ip_del.h |
---|
11 | perl -w make_ip6_del.pl < ip6_del_list > ip6_del.h |
---|
12 | perl -w make_as_del.pl < as_del_list > as_del.h |
---|
13 | perl -w make_tld_serv.pl < tld_serv_list > tld_serv.h |
---|
14 | cc -DENABLE_NLS -I/opt/local/include -O2 -c whois.c |
---|
15 | cc -DENABLE_NLS -I/opt/local/include -O2 -c utils.c |
---|
16 | cc -L/opt/local/lib -lintl -o whois whois.o utils.o |
---|
17 | cc -DENABLE_NLS -I/opt/local/include -O2 -c mkpasswd.c |
---|
18 | cc -L/opt/local/lib -lintl -lcrypt -o mkpasswd mkpasswd.o utils.o |
---|
19 | /usr/bin/ld: can't locate file for: -lcrypt |
---|
20 | collect2: ld returned 1 exit status |
---|
21 | make: *** [mkpasswd] Error 1 |
---|
22 | |
---|
23 | Seems you're now building mkpasswd by default, and to do this you're adding |
---|
24 | -lcrypt to the LDFLAGS, but Apple says this option is not supported in Mac |
---|
25 | OS X: |
---|
26 | |
---|
27 | http://developer.apple.com/technotes/tn2002/tn2071.html |
---|
28 | |
---|
29 | This message says -lcrypt can simply be omitted, since the crypt function is |
---|
30 | in Mac OS X's C library: |
---|
31 | |
---|
32 | http://lists.apple.com/archives/unix-porting/2005/Dec/msg00018.html |
---|
33 | |
---|
34 | So you should probably update your Makefile to not use -lcrypt on Mac OS X. |
---|
35 | I've already added a patchfile to our port that does this. |
---|
36 | |
---|
37 | Here is my ticket on this issue: |
---|
38 | |
---|
39 | http://trac.macosforge.org/projects/macports/ticket/14951 |
---|
40 | |
---|
41 | Thanks. |
---|
42 | |
---|
43 | -Ryan |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | ============================================================================ |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | From: md@Linux.IT (Marco d'Itri) |
---|
52 | Date: April 8, 2008 01:04:33 CDT |
---|
53 | To: Ryan Schmidt <ryandesign@macports.org> |
---|
54 | Subject: Re: whois 4.7.26 and -lcrypt on Mac OS X |
---|
55 | |
---|
56 | On Apr 07, Ryan Schmidt <ryandesign@macports.org> wrote: |
---|
57 | |
---|
58 | > So you should probably update your Makefile to not use -lcrypt on Mac OS |
---|
59 | > X. I've already added a patchfile to our port that does this. |
---|
60 | |
---|
61 | This would break it on other platforms. |
---|
62 | The package does not use autoconf, so you are supposed to tweak the |
---|
63 | Makefile for your platform. |
---|
64 | |
---|
65 | -- |
---|
66 | ciao, |
---|
67 | Marco |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | ============================================================================ |
---|
72 | |
---|
73 | |
---|
74 | |
---|
75 | From: Ryan Schmidt <ryandesign@macports.org> |
---|
76 | Date: April 14, 2008 02:31:10 CDT |
---|
77 | To: Marco d'Itri <md@Linux.IT> |
---|
78 | Subject: Re: whois 4.7.26 and -lcrypt on Mac OS X |
---|
79 | |
---|
80 | |
---|
81 | On Apr 8, 2008, at 1:04 AM, Marco d'Itri wrote: |
---|
82 | |
---|
83 | > On Apr 07, Ryan Schmidt <ryandesign@macports.org> wrote: |
---|
84 | > |
---|
85 | >> So you should probably update your Makefile to not use -lcrypt on Mac OS |
---|
86 | >> X. I've already added a patchfile to our port that does this. |
---|
87 | > |
---|
88 | > This would break it on other platforms. |
---|
89 | |
---|
90 | Well sure, you shouldn't omit -lcrypt always. You should only omit it on the |
---|
91 | darwin platform. |
---|
92 | |
---|
93 | > The package does not use autoconf, so you are supposed to tweak the |
---|
94 | > Makefile for your platform. |
---|
95 | |
---|
96 | Ok. As I said, in MacPorts, I'm already tweaking the Makefile to not use |
---|
97 | -lcrypt on Mac OS X. I just thought you might want Mac users to be able to |
---|
98 | compile whois 4.7.26 without needing to make any changes to the source, as |
---|
99 | had been the case with 4.7.25 and earlier. But if not, I can keep the patch |
---|
100 | in the MacPorts portfile. |
---|
101 | |
---|
102 | -Ryan |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | ============================================================================ |
---|
107 | |
---|
108 | |
---|
109 | |
---|
110 | From: md@Linux.IT (Marco d'Itri) |
---|
111 | Date: April 14, 2008 02:35:10 CDT |
---|
112 | To: Ryan Schmidt <ryandesign@macports.org> |
---|
113 | Subject: Re: whois 4.7.26 and -lcrypt on Mac OS X |
---|
114 | |
---|
115 | On Apr 14, Ryan Schmidt <ryandesign@macports.org> wrote: |
---|
116 | |
---|
117 | > Well sure, you shouldn't omit -lcrypt always. You should only omit it on |
---|
118 | > the darwin platform. |
---|
119 | |
---|
120 | How do you plan to do this without autoconf, exactly? |
---|
121 | |
---|
122 | -- |
---|
123 | ciao, |
---|
124 | Marco |
---|
125 | |
---|
126 | |
---|
127 | |
---|
128 | ============================================================================ |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | From: Ryan Schmidt <ryandesign@macports.org> |
---|
133 | Date: April 14, 2008 02:45:37 CDT |
---|
134 | To: md@Linux.IT (Marco d'Itri) |
---|
135 | Subject: Re: whois 4.7.26 and -lcrypt on Mac OS X |
---|
136 | |
---|
137 | |
---|
138 | On Apr 14, 2008, at 2:35 AM, Marco d'Itri wrote: |
---|
139 | |
---|
140 | > On Apr 14, Ryan Schmidt <ryandesign@macports.org> wrote: |
---|
141 | > |
---|
142 | >> Well sure, you shouldn't omit -lcrypt always. You should only omit it on |
---|
143 | >> the darwin platform. |
---|
144 | > |
---|
145 | > How do you plan to do this without autoconf, exactly? |
---|
146 | |
---|
147 | Well I'm not really sure. I don't write compiled software, so you probably |
---|
148 | have more experience than me in that regard. If there's a way to run a |
---|
149 | program in a Makefile and do something based on its output, you could use |
---|
150 | the "uname" command, which returns the word "Darwin" on my system and would |
---|
151 | probably return something different on other operating systems. If it can't |
---|
152 | be done in a Makefile, you could write a tiny configure script which finds |
---|
153 | out the OS using uname and makes platform-specific changes to the Makefile |
---|
154 | if necessary. |
---|
155 | |
---|
156 | Anyway, I just wanted to be sure you're aware of the issue. MacPorts |
---|
157 | maintainers are encouraged to patch software as little as possible, instead |
---|
158 | reporting encountered problems upstream so they can be fixed there if |
---|
159 | appropriate. Since you're now aware of the situation, I'll leave it to you |
---|
160 | to handle in any way you see fit. |
---|
161 | |
---|
162 | -Ryan |
---|