网络上有许多 Lynx 的 Windows 版本,但它们都不支持 HTTPS,因此我尝试在启用 SSL 的情况下进行构建。
该./configure
部分成功了,但在尝试时构建遇到了错误make
。GCC 抱怨 OpenSSL 头文件本身存在各种错误。
./configure
使用以下选项运行:
$ ./configure --enable-nls --with-ssl --with-gnutls --enable-gnutls-compat --enable-ipv6 --enable-ascii-ctypes --enable-japanese-utf8 --enable-charset-choice --enable-kbd-layout --enable-nested-tables --enable-progressbar --enable-scrollbar --enable-sessions --enable-sessions-cache --with-zlib
(如果有人需要,我会发布上述输出)
输出make
:
$ make
/bin/sh -c 'SHELL=/bin/sh /bin/sh ./scripts/cfg_defs.sh .'
Constructing sed-script help_files.sed
sed -e '/^#/d' -e '/^$/d' \
-e 's%\(.*\)=\(.*\@.*\)$%s=@\1@=\2=g%' \
-e 's%\(.*\)=\(http:.*\)$%s=@\1@=\2=g%' \
-e 's%\(.*\)=\(ftp:.*\)$%s=@\1@=\2=g%' \
-e 's%\(.*\)=\(.*\.html\)$%s=@\1@=\2=g%' \
help_files.tmp | tr '=' '"' > help_files.sed
Appending interim-fix for existing html files to help_files.sed
sed -e '/^#/d' -e '/[:@]/d' -e '/^$/d' \
-e 's%\(.*\)=\(.*\.html\)$%s=\2=\2=g%' \
-e 's%\.html=%\\.html=%' \
help_files.tmp | tr '=' '"' >> help_files.sed
if test -n ""; then echo 's%\\%%g' >> help_files.sed; fi
Creating LYHelp.h
**********************************************
Help files will NOT be gzipped.
**********************************************
/bin/sh ./scripts/fixtext.sh ./LYMessages_en.h >LYMessages.c
cd ./po && make DESTDIR="" CC="gcc"
make[1]: Entering directory `/cygdrive/c/lynx/po'
msginit --no-translator -l en -i lynx.pot
Created en.po.
file=./`echo en | sed 's,.*/,,'`.gmo \
&& rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt.exe -o $file en.po
make[1]: Leaving directory `/cygdrive/c/lynx/po'
cd ./WWW/Library/Implementation && make DESTDIR="" CC="gcc" LY_CFLAGS="-O2 " CPPFLAGS="-U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 -DWIN_EX -D_WINDOWS_NSL" LYFLAGS=""
make[1]: Entering directory `/cygdrive/c/lynx/WWW/Library/Implementation'
gcc -DHAVE_CONFIG_H -I../../.. -I../../../src -I../../.. -I../../../src -I../../../WWW/Library/Implementation -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 -DWIN_EX -D_WINDOWS_NSL -O2 -I../../../WWW/Library/Implementation/ -DACCESS_AUTH -c ../../../WWW/Library/Implementation/HTParse.c
In file included from /usr/include/openssl/crypto.h:131:0,
from /usr/include/openssl/comp.h:5,
from /usr/include/openssl/ssl.h:149,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/ossl_typ.h:153:29: error: expected ‘)’ before numeric constant
/usr/include/openssl/ossl_typ.h:199:33: error: expected ‘)’ before numeric constant
In file included from /usr/include/openssl/ssl.h:156:0,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/x509.h:199:1: error: pasting "stack_st_" and "(" does not give a valid preprocessing token
/usr/include/openssl/x509.h:199:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:210:34: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:235:2: error: expected specifier-qualifier-list before ‘(’ token
/usr/include/openssl/x509.h:254:2: error: expected specifier-qualifier-list before ‘(’ token
/usr/include/openssl/x509.h:330:3: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:453:2: error: expected specifier-qualifier-list before ‘(’ token
In file included from /usr/include/openssl/x509.h:600:0,
from /usr/include/openssl/ssl.h:156,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/x509_vfy.h:150:50: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:152:56: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:203:56: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:204:59: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:253:56: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:254:59: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:407:7: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:408:80: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:415:59: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:416:62: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:443:59: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:459:56: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509_vfy.h:461:62: error: expected declaration specifiers or ‘...’ before ‘(’ token
In file included from /usr/include/openssl/x509.h:601:0,
from /usr/include/openssl/ssl.h:156,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/pkcs7.h:88:2: error: expected specifier-qualifier-list before ‘(’ token
/usr/include/openssl/pkcs7.h:104:4: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:106:1: error: pasting "stack_st_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:106:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:293:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pkcs7.h:293:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:293:1: error: pasting ")" and "_new" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:293:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:293:1: error: pasting ")" and "_free" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:293:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pkcs7.h:293:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:293:1: error: pasting "d2i_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:293:1: error: pasting "i2d_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:293:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:293:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:293:1: error: ‘i2d_’ declared as function returning a function
/usr/include/openssl/pkcs7.h:293:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:293:1: error: pasting ")" and "_it" does not give a valid preprocessing token
/usr/include/openssl/pkcs7.h:314:27: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:316:28: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:317:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:322:23: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:323:48: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:331:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pkcs7.h:331:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:333:46: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:338:34: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:348:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:350:26: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:352:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:353:39: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:354:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:356:26: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:362:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pkcs7.h:362:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pkcs7.h:374:31: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:376:42: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:379:35: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:380:36: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pkcs7.h:381:30: error: expected declaration specifiers or ‘...’ before ‘(’ token
In file included from /usr/include/openssl/ssl.h:156:0,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/x509.h:632:24: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:679:28: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:679:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘const’
/usr/include/openssl/x509.h:772:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:772:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:829:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:829:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:829:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:829:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:829:1: error: pasting ")" and "_it" does not give a valid preprocessing token
/usr/include/openssl/x509.h:833:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:833:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:833:1: error: pasting ")" and "_new" does not give a valid preprocessing token
/usr/include/openssl/x509.h:833:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:833:1: error: pasting ")" and "_free" does not give a valid preprocessing token
/usr/include/openssl/x509.h:833:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:833:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:833:1: error: pasting "d2i_" and "(" does not give a valid preprocessing token
/usr/include/openssl/x509.h:833:1: error: pasting "i2d_" and "(" does not give a valid preprocessing token
/usr/include/openssl/x509.h:833:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:833:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:833:1: error: ‘i2d_’ declared as function returning a function
/usr/include/openssl/x509.h:833:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:833:1: error: pasting ")" and "_it" does not give a valid preprocessing token
/usr/include/openssl/x509.h:835:20: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:835:36: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:842:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:842:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:842:1: error: pasting ")" and "_new" does not give a valid preprocessing token
/usr/include/openssl/x509.h:842:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:842:1: error: pasting ")" and "_free" does not give a valid preprocessing token
/usr/include/openssl/x509.h:842:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:842:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:842:1: error: pasting "d2i_" and "(" does not give a valid preprocessing token
/usr/include/openssl/x509.h:842:1: error: pasting "i2d_" and "(" does not give a valid preprocessing token
/usr/include/openssl/x509.h:842:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:842:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:842:1: error: ‘i2d_’ declared as function returning a function
/usr/include/openssl/x509.h:842:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:842:1: error: pasting ")" and "_it" does not give a valid preprocessing token
/usr/include/openssl/x509.h:883:27: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:912:37: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:913:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:913:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:914:38: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:915:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/x509.h:915:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:924:46: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:953:43: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:980:26: error: expected ‘)’ before numeric constant
/usr/include/openssl/x509.h:980:40: error: expected ‘;’, ‘,’ or ‘)’ before ‘const’
/usr/include/openssl/x509.h:981:30: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:982:34: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:991:37: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:995:31: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:996:34: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1006:29: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1007:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1009:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1014:34: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1015:34: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1017:38: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1018:41: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1019:27: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1021:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1023:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1029:32: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1153:57: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/x509.h:1155:47: error: expected declaration specifiers or ‘...’ before ‘(’ token
In file included from /usr/include/openssl/ssl.h:162:0,
from ../../../WWW/Library/Implementation/HTUtils.h:685,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/pem.h:158:2: error: expected specifier-qualifier-list before ‘(’ token
/usr/include/openssl/pem.h:463:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pem.h:463:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pem.h:463:1: error: pasting "PEM_read_bio_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pem.h:463:1: error: expected identifier or ‘(’ before ‘LPCSTR’
/usr/include/openssl/pem.h:463:1: error: expected ‘)’ before numeric constant
/usr/include/openssl/pem.h:463:1: error: pasting "PEM_read_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pem.h:463:1: error: pasting "PEM_write_bio_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pem.h:463:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pem.h:463:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pem.h:463:1: error: ‘PEM_write_bio_’ declared as function returning a function
/usr/include/openssl/pem.h:463:1: error: pasting "PEM_write_" and "(" does not give a valid preprocessing token
/usr/include/openssl/pem.h:463:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pem.h:463:1: error: expected declaration specifiers or ‘...’ before ‘(’ token
/usr/include/openssl/pem.h:463:1: error: ‘PEM_write_’ declared as function returning a function
In file included from ../../../WWW/Library/Implementation/HTUtils.h:685:0,
from ../../../WWW/Library/Implementation/HTParse.c:8:
/usr/include/openssl/ssl.h:1289:2: error: expected specifier-qualifier-list before ‘(’ token
makefile:312: recipe for target `HTParse.o' failed
make[1]: *** [HTParse.o] Error 1
make[1]: Leaving directory `/cygdrive/c/lynx/WWW/Library/Implementation'
makefile:191: recipe for target `all' failed
make: *** [all] Error 2
有谁知道如何解决这个问题(除了禁用 SSL,这是我所需要的)?
提前谢谢了。
答案1
编辑 WWW/Library/Implementation/HTUtils.h,如下所示。更改:
#if defined(__CYGWIN__) /* 1998/12/31 (Thu) 16:13:46 */
#include <windows.h> /* #include "windef.h" */
到:
#if defined(__CYGWIN__) /* 1998/12/31 (Thu) 16:13:46 */
#define NOCRYPT
#include <windows.h> /* #include "windef.h" */
#include <openssl/bio.h>