cjemorton / skipfish

Automatically exported from code.google.com/p/skipfish
Apache License 2.0
0 stars 0 forks source link

No build in OS X 10.6.2 #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
cc skipfish.c -o skipfish -Wall -funsigned-char -g -ggdb -U_FORTIFY_SOURCE -O3 
-Wno-
format http_client.c database.c crawler.c analysis.c report.c -lcrypto -lssl 
-lidn -lz

Results in:

http_client.c:38:18: error: idna.h: No such file or directory
http_client.c: In function ‘parse_url’:
http_client.c:275: warning: implicit declaration of function 
‘idna_to_ascii_8z’
http_client.c:275: error: ‘IDNA_SUCCESS’ undeclared (first use in this 
function)
http_client.c:275: error: (Each undeclared identifier is reported only once
http_client.c:275: error: for each function it appears in.)
report.c: In function ‘copy_static_code’:
report.c:744: warning: passing argument 3 of ‘scandir’ from incompatible 
pointer type

Original issue reported on code.google.com by thepytho...@gmail.com on 19 Mar 2010 at 10:48

GoogleCodeExporter commented 8 years ago
Please read the documentation first. You need to install libidn on your system.

Original comment by lcam...@gmail.com on 19 Mar 2010 at 10:50

GoogleCodeExporter commented 8 years ago
Libidn is fully built and installed.

Original comment by thepytho...@gmail.com on 19 Mar 2010 at 10:52

GoogleCodeExporter commented 8 years ago
Then it is not in the standard include path on your operating system; if that's 
the
case, you might need to bring it with up with the OS vendor.

A workaround is to provide an additional -I<path> flag in CFLAGS in the 
Makefile. You
can locate the file by doing find /usr -name idna.h

Original comment by lcam...@google.com on 19 Mar 2010 at 10:55

GoogleCodeExporter commented 8 years ago
Issue 3 has been merged into this issue.

Original comment by lcam...@gmail.com on 20 Mar 2010 at 12:40

GoogleCodeExporter commented 8 years ago
Most people on OSX use a package system, darwin/mac ports or fink. So MOST of 
the 
time a library like libidn will not be in the standard path. The general 
solution to this is 
to have a configure step rather than a hard coded make file. 

The GNU conventions work well. They also call for an INSTALL file explaining 
how to 
build and install the application. As it is the README is quite weak on 
installation. 

Original comment by anarchog...@gmail.com on 20 Mar 2010 at 12:01

GoogleCodeExporter commented 8 years ago
For what it's worth, on OSX if you download libidna directly and install it 
from source 
from here: http://ftp.gnu.org/gnu/libidn/libidn-1.18.tar.gz

Then Skipfish's make file correctly finds it in the path and you don't have to 
go mucking 
with things. 

Original comment by anarchog...@gmail.com on 20 Mar 2010 at 12:47

GoogleCodeExporter commented 8 years ago
If your package system does not install the library in the include path, I do 
not see
this as a problem in skipfish, but with the package. As noted, compiling from 
source
works OK.

Original comment by lcam...@google.com on 20 Mar 2010 at 3:25

GoogleCodeExporter commented 8 years ago
I think that it is worth noting that it is the *dev* package of libidn that is 
needed 
or the complete source package (which includes the headers... ".h" files). I am 
using 
Ubuntu 9.10. You can see below that I already have libidn installed, but not 
the dev 
package. Here is what I did:

21:10:19 [karl@karl-desktop] ~/Downloads$ tar xfz skipfish-1.09b.tgz
21:10:29 [karl@karl-desktop] ~/Downloads$ cd skipfish/
21:10:31 [karl@karl-desktop] ~/Downloads/skipfish$ make
cc skipfish.c -o skipfish -Wall -funsigned-char -g -ggdb -D_FORTIFY_SOURCE=0 -
I/usr/local/include/ -I/opt/local/include/ -O3 -Wno-format http_client.c 
database.c 
crawler.c analysis.c report.c -lcrypto -lssl -lidn -lz -L/usr/local/lib/ -
L/opt/local/lib
http_client.c:39:18: error: idna.h: No such file or directory
http_client.c: In function ‘parse_url’:
http_client.c:276: warning: implicit declaration of function 
‘idna_to_ascii_8z’
http_client.c:276: error: ‘IDNA_SUCCESS’ undeclared (first use in this 
function)
http_client.c:276: error: (Each undeclared identifier is reported only once
http_client.c:276: error: for each function it appears in.)
make: *** [skipfish] Error 1
21:10:38 [karl@karl-desktop] ~/Downloads/skipfish$ find /lib /usr/lib 
/usr/local/lib/ 
| grep libidn
/usr/lib/libidn.la
/usr/lib/libidn.so.11
/usr/lib/libidn.so.11.5.44
21:12:12 [karl@karl-desktop] ~/Downloads/skipfish$ sudo aptitude install 
libidn11-dev
<SNIP>
Writing extended state information... Done

21:16:03 [karl@karl-desktop] ~/Downloads/skipfish$ make
cc skipfish.c -o skipfish -Wall -funsigned-char -g -ggdb -D_FORTIFY_SOURCE=0 -
I/usr/local/include/ -I/opt/local/include/ -O3 -Wno-format http_client.c 
database.c 
crawler.c analysis.c report.c -lcrypto -lssl -lidn -lz -L/usr/local/lib/ -
L/opt/local/lib

NOTE: See dictionaries/README-FIRST to pick a dictionary for the tool.

21:16:37 [karl@karl-desktop] ~/Downloads/skipfish$ 

Original comment by karlwil...@gmail.com on 22 Mar 2010 at 1:22

GoogleCodeExporter commented 8 years ago
This is already covered on:
http://code.google.com/p/skipfish/wiki/KnownIssues

Original comment by lcam...@gmail.com on 22 Mar 2010 at 1:44

GoogleCodeExporter commented 8 years ago
> Most people on OSX use a package system, darwin/mac ports or fink.

For homebrew, you can do:
brew install libidn

skipfish then compiles fine

Original comment by dimi...@gmail.com on 4 Nov 2012 at 9:31