Hi, I have been using ports in the past without any issue.. I tried to install gnupg from ports today and got this error: PowerBookG4667:~/Downloads/macports/MacPorts-1.4.0 tcrawley$ sudo port install gnupg Password: Error: Unable to execute port: invalid command name "configure.cppflags" PowerBookG4667:~/Downloads/macports/MacPorts-1.4.0 tcrawley$ I tried to perform the command "port selfupdate" to update my port installation with the latest version. This failed to compile with error sha1cmd.c: In function 'SHA1Cmd': sha1cmd.c:79: error: 'SHA_DIGEST_LENGTH' undeclared (first use in this function) sha1cmd.c:79: error: (Each undeclared identifier is reported only once sha1cmd.c:79: error: for each function it appears in.) sha1cmd.c:100: warning: implicit declaration of function 'SHA1_File' sha1cmd.c:79: warning: unused variable 'buf' make[2]: *** [sha1cmd.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1 I examined the source of SHA1Cmd.c and it seems that the compile flag HAVE_LIBCRYPTO is not set and so the configure script uses /usr/include/sha.h which does not define SHA_DIGEST_LENGTH rather than /usr/include/openssl/sha.h which does define SHA_DIGEST_LENGTH.... I tried adding SHA_DIGEST_LENGTH to /usr/include/sha.h to get around this problem but port selfupdate dies with rmd160cmd.c:66:20: error: ripemd.h: No such file or directory rmd160cmd.c: In function 'RMD160Cmd': rmd160cmd.c:75: error: 'RIPEMD160_DIGEST_LENGTH' undeclared (first use in this function) rmd160cmd.c:75: error: (Each undeclared identifier is reported only once rmd160cmd.c:75: error: for each function it appears in.) rmd160cmd.c:96: warning: implicit declaration of function 'RIPEMD160_File' rmd160cmd.c:75: warning: unused variable 'buf' make[2]: *** [rmd160cmd.o] Error 1 make[1]: *** [all] Error 1 make: *** [all] Error 1 Please help me to resolve these problems... Thanks Tom
On 03 Jun, 2007, at 18:56, Thomas Crawley wrote:
I tried to perform the command "port selfupdate" to update my port installation with the latest version.
Just to confirm your suspicions, selfupdate is the correct fix to this problem; "configure.cppflags" was added in 1.4.*
I examined the source of SHA1Cmd.c and it seems that the compile flag HAVE_LIBCRYPTO is not set and so the configure script uses
/usr/include/sha.h
Interestingly, I do not have this on my system (10.4.9).
rmd160cmd.c:66:20: error: ripemd.h: No such file or directory
On the other hand, I *do* have /usr/include/openssl/ripemd.h So, a couple of questions: * What version of Mac OS are you running? * Do you have the latest version of Xcode? * What are the contents of /usr/include/openssl? * What does `/usr/bin/openssl version` report? Chris
Hi, Thanks for the response I am running Mac OS X 10.4.9 which I updated with some security fixes this morning. PowerBookG4667:~ tcrawley$ uname -a Darwin PowerBookG4667.local 8.9.0 Darwin Kernel Version 8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC Power Macintosh powerpc I have the latest version of Xcode v 2.4.1 which I downloaded and installed today while trying to address this problem. The contents of /usr/include/openssl PowerBookG4667:~ tcrawley$ ls -alt /usr/include/openssl/ total 2296 drwxr-xr-x 242 root wheel 8228 Jun 3 18:47 .. drwxr-xr-x 69 root wheel 2346 Jun 3 14:41 . -rw-r--r-- 1 root wheel 5927 Sep 11 2006 kssl.h -rw-r--r-- 1 root wheel 75107 Sep 11 2006 ssl.h -rw-r--r-- 1 root wheel 10716 Sep 11 2006 ssl2.h -rw-r--r-- 1 root wheel 3744 Sep 11 2006 ssl23.h -rw-r--r-- 1 root wheel 20937 Sep 11 2006 ssl3.h -rw-r--r-- 1 root wheel 9141 Sep 11 2006 tls1.h -rw-r--r-- 1 root wheel 4908 Sep 11 2006 fips.h -rw-r--r-- 1 root wheel 2884 Sep 11 2006 fips_rand.h -rw-r--r-- 1 root wheel 6922 Sep 11 2006 fips_sha.h -rw-r--r-- 1 root wheel 1267 Sep 11 2006 comp.h -rw-r--r-- 1 root wheel 7636 Sep 11 2006 krb5_asn.h -rw-r--r-- 1 root wheel 23830 Sep 11 2006 ocsp.h -rw-r--r-- 1 root wheel 12218 Sep 11 2006 pkcs12.h -rw-r--r-- 1 root wheel 16892 Sep 11 2006 ui.h -rw-r--r-- 1 root wheel 3439 Sep 11 2006 ui_compat.h -rw-r--r-- 1 root wheel 26671 Sep 11 2006 asn1t.h -rw-r--r-- 1 root wheel 9372 Sep 11 2006 conf.h -rw-r--r-- 1 root wheel 4080 Sep 11 2006 conf_api.h -rw-r--r-- 1 root wheel 24618 Sep 11 2006 pem.h -rw-r--r-- 1 root wheel 2863 Sep 11 2006 pem2.h -rw-r--r-- 1 root wheel 15793 Sep 11 2006 pkcs7.h -rw-r--r-- 1 root wheel 4253 Sep 11 2006 txt_db.h -rw-r--r-- 1 root wheel 44896 Sep 11 2006 x509.h -rw-r--r-- 1 root wheel 16594 Sep 11 2006 x509_vfy.h -rw-r--r-- 1 root wheel 23090 Sep 11 2006 x509v3.h -rw-r--r-- 1 root wheel 40619 Sep 11 2006 asn1.h -rw-r--r-- 1 root wheel 18383 Sep 11 2006 asn1_mac.h -rw-r--r-- 1 root wheel 27580 Sep 11 2006 bio.h -rw-r--r-- 1 root wheel 11977 Sep 11 2006 err.h -rw-r--r-- 1 root wheel 33765 Sep 11 2006 evp.h -rw-r--r-- 1 root wheel 7450 Sep 11 2006 lhash.h -rw-r--r-- 1 root wheel 5423 Sep 11 2006 rand.h -rw-r--r-- 1 root wheel 105865 Sep 11 2006 safestack.h -rw-r--r-- 1 root wheel 4380 Sep 11 2006 stack.h -rw-r--r-- 1 root wheel 4854 Sep 11 2006 aes.h -rw-r--r-- 1 root wheel 4229 Sep 11 2006 buffer.h -rw-r--r-- 1 root wheel 7768 Sep 11 2006 dh.h -rw-r--r-- 1 root wheel 9769 Sep 11 2006 dsa.h -rw-r--r-- 1 root wheel 13871 Sep 11 2006 dso.h -rw-r--r-- 1 root wheel 35327 Sep 11 2006 engine.h -rw-r--r-- 1 root wheel 5174 Sep 11 2006 blowfish.h -rw-r--r-- 1 root wheel 22121 Sep 11 2006 bn.h -rw-r--r-- 1 root wheel 4420 Sep 11 2006 cast.h -rw-r--r-- 1 root wheel 9656 Sep 11 2006 ec.h -rw-r--r-- 1 root wheel 16117 Sep 11 2006 rsa.h -rw-r--r-- 1 root wheel 10718 Sep 11 2006 des.h -rw-r--r-- 1 root wheel 18221 Sep 11 2006 des_old.h -rw-r--r-- 1 root wheel 4422 Sep 11 2006 hmac.h -rw-r--r-- 1 root wheel 3921 Sep 11 2006 mdc2.h -rw-r--r-- 1 root wheel 4398 Sep 11 2006 rc2.h -rw-r--r-- 1 root wheel 3795 Sep 11 2006 rc4.h -rw-r--r-- 1 root wheel 4782 Sep 11 2006 rc5.h -rw-r--r-- 1 root wheel 4340 Sep 11 2006 ripemd.h -rw-r--r-- 1 root wheel 540 Sep 11 2006 ebcdic.h -rw-r--r-- 1 root wheel 3927 Sep 11 2006 md2.h -rw-r--r-- 1 root wheel 4707 Sep 11 2006 md4.h -rw-r--r-- 1 root wheel 4707 Sep 11 2006 md5.h -rw-r--r-- 1 root wheel 99055 Sep 11 2006 obj_mac.h -rw-r--r-- 1 root wheel 33172 Sep 11 2006 objects.h -rw-r--r-- 1 root wheel 5559 Sep 11 2006 opensslconf.h -rw-r--r-- 1 root wheel 4911 Sep 11 2006 ossl_typ.h -rw-r--r-- 1 root wheel 5077 Sep 11 2006 sha.h -rw-r--r-- 1 root wheel 13331 Sep 11 2006 symhacks.h -rw-r--r-- 1 root wheel 19963 Sep 11 2006 crypto.h -rw-r--r-- 1 root wheel 9541 Sep 11 2006 e_os2.h -rw-r--r-- 1 root wheel 3752 Sep 11 2006 opensslv.h -rw-r--r-- 1 root wheel 3552 Sep 11 2006 tmdiff.h PowerBookG4667:~ tcrawley$ so I have /usr/include/openssl/ripemd.h also but it is not being picked up by configure etc PowerBookG4667:~ tcrawley$ /usr/bin/openssl version OpenSSL 0.9.7l 28 Sep 2006 Thanks Tom On Jun 3, 2007, at 9:59 PM, Chris Pickel wrote:
On 03 Jun, 2007, at 18:56, Thomas Crawley wrote:
I tried to perform the command "port selfupdate" to update my port installation with the latest version.
Just to confirm your suspicions, selfupdate is the correct fix to this problem; "configure.cppflags" was added in 1.4.*
I examined the source of SHA1Cmd.c and it seems that the compile flag HAVE_LIBCRYPTO is not set and so the configure script uses
/usr/include/sha.h
Interestingly, I do not have this on my system (10.4.9).
rmd160cmd.c:66:20: error: ripemd.h: No such file or directory
On the other hand, I *do* have /usr/include/openssl/ripemd.h
So, a couple of questions: * What version of Mac OS are you running? * Do you have the latest version of Xcode? * What are the contents of /usr/include/openssl? * What does `/usr/bin/openssl version` report?
Chris
On 03 Jun, 2007, at 22:12, Thomas Crawley wrote:
so I have /usr/include/openssl/ripemd.h also but it is not being picked up by configure etc
As far as I can tell, you should be using libcrypto if you can include openssl/md5.h (which appears to be the case for you), if libcrypto contains MD5_UPDATE, and if libmd was not found first. If you `port -d selfupdate`, you should see some mention of libmd and libcrypto. For example, I see: checking for MD5Update in -lmd... no checking for MD5_Update in -lcrypto... yes So perhaps you have libmd on your system? (version 0.3 of libmd should provide the headers you're missing). If this is your problem, you could work around it by moving libmd aside temporarily while you selfupdate. That would force libcrypto to be used. Chris (pardon the switch of email address)
Hi, I see the following in the output checking for MD5Update in -lmd... yes checking md5.h usability... yes checking md5.h presence... yes checking for md5.h... yes checking for X... libraries /usr/X11R6/lib, headers I do not see any message about -lcrypto but I do see cc -dynamiclib -L/usr/local/lib -L/usr/lib -lcurl -lssl -lcrypto -lz darwinports.o portconf.o session.o util.o -o Darwinports.dylib -L/ System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4 -L/ usr/local/lib -L/usr/lib -lcurl -lssl -lcrypto -lz -lreadline -lmd further down in the output... How do I check for libmd ? How do I prevent libmd from being used ? Regards Tom On Jun 3, 2007, at 10:50 PM, Chris Pickel wrote:
On 03 Jun, 2007, at 22:12, Thomas Crawley wrote:
so I have /usr/include/openssl/ripemd.h also but it is not being picked up by configure etc
As far as I can tell, you should be using libcrypto if you can include openssl/md5.h (which appears to be the case for you), if libcrypto contains MD5_UPDATE, and if libmd was not found first.
If you `port -d selfupdate`, you should see some mention of libmd and libcrypto. For example, I see:
checking for MD5Update in -lmd... no checking for MD5_Update in -lcrypto... yes
So perhaps you have libmd on your system? (version 0.3 of libmd should provide the headers you're missing). If this is your problem, you could work around it by moving libmd aside temporarily while you selfupdate. That would force libcrypto to be used.
Chris
(pardon the switch of email address)
On 03 Jun, 2007, at 23:06, Thomas Crawley wrote:
checking for MD5Update in -lmd... yes checking md5.h usability... yes checking md5.h presence... yes checking for md5.h... yes
Alright, so it looks like you're compiling with libmd and missing some stuff you need from libcrypto.
How do I check for libmd ?
How do I prevent libmd from being used ?
Well, configure checked for libmd and found it. As for how to prevent it, you first need to find where it is--probably /usr/local/lib; maybe /usr/lib--and rename it temporarily while you compile, i.e. go to the directory and sudo mv libmd.dylib no-libmd.dylib ...followed by the same command in reverse once you've updated. Chris
Hi, Chris, Thanks for all your help The filename is /usr/lib/libmd.a. sudo mv libmd.a no-libmd.tmp and sudo port -v selfupdate works fine. What is libmd and do the openssl libraries provide equivalent functionality ? Thanks Tom On Jun 3, 2007, at 11:38 PM, Chris Pickel wrote:
On 03 Jun, 2007, at 23:06, Thomas Crawley wrote:
checking for MD5Update in -lmd... yes checking md5.h usability... yes checking md5.h presence... yes checking for md5.h... yes
Alright, so it looks like you're compiling with libmd and missing some stuff you need from libcrypto.
How do I check for libmd ?
How do I prevent libmd from being used ?
Well, configure checked for libmd and found it. As for how to prevent it, you first need to find where it is--probably /usr/local/ lib; maybe /usr/lib--and rename it temporarily while you compile, i.e. go to the directory and
sudo mv libmd.dylib no-libmd.dylib
...followed by the same command in reverse once you've updated.
Chris
On 04 Jun, 2007, at 00:17, Thomas Crawley wrote:
Chris, Thanks for all your help
No problem.
What is libmd and do the openssl libraries provide equivalent functionality ?
Well, I don't have libmd and can't install it via MacPorts because parts conflict with openssl. But from what it's trying to install, it looks like it implements md5, sha, and rmd160 (and nothing else), which are the three checksums that MacPorts uses. Openssl has a lot more. I'm assuming the reason MacPorts prefers libmd to libcrypto is because libmd targets specifically what we want. But, MacPorts now targets only Apple, and Apple doesn't provide it. Any base hackers have a reason we should still try to build with it? It seems the current situation can cause problems for people. Chris
participants (3)
-
Chris Pickel
-
Chris Pickel
-
Thomas Crawley