※ 引述《[email protected] (~機器人沒有暱稱~)》之銘言:
: ※ 引述《[email protected] (snowwhite)》之銘言:
: > checking if conversion of longlong to float works... Segmentation fault (core dumped)
: > no
: > configure: error: Your compiler cannot convert a longlong value to a float!
: > If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try
: > again
: 這裡很清楚的跟你說解決的方法啦
ports 裡面的 egcs 是被 mark 成 broken 的 :
www [root]:/usr/ports> make search name=egcs
Port: egcs-1.1.2
Path: /usr/ports/lang/egcs
Info: EGCS enhanced version of the GNU compiler suite
Maint: [email protected]
Index: lang
B-deps: expat-1.95.6_1 gettext-0.11.5_1 gmake-3.80 libiconv-1.9.1_1
R-deps:
www [root]:/usr/ports> cd /usr/ports/lang/egcs
www [root]:/usr/ports/lang/egcs> make install
===> egcs-1.1.2 is marked as broken: Does not compile (bad C++ code).
回主題, MySQL 3.23.57 怪怪的, 遇到這個問題的話請先做以下的動作:
1. www [root]:/usr/ports/databases/mysql323-server> make clean
2. www [root]:/usr/ports/databases/mysql323-server> make extract
3. 用編輯器開啟
/usr/ports/databases/mysql323-server/work/mysql-3.23.57/configure 這個檔案,
找到以下這段:
#include <stdio.h>
typedef long long longlong;
main()
{
longlong ll=1;
float f;
FILE *file=fopen("conftestval", "w");
f = (float) ll;
fprintf(file,"%g\n",f);
close(file);
exit (0);
}
把裡面的 close(file) 改成 fclose(file) , 變成這樣:
#include <stdio.h>
typedef long long longlong;
main()
{
longlong ll=1;
float f;
FILE *file=fopen("conftestval", "w");
f = (float) ll;
fprintf(file,"%g\n",f);
fclose(file);
exit (0);
}
存檔後離開.
接下來就可以進行安裝了, ex:
www [root]:/usr/ports/databases/mysql323-server> make install clean
--
Leo [joehorn]:~> make love
make: don't know how to make love. Stop
Leo [joehorn]:~> why?
why?: No match.
--
※Origin:星 情 小 築 < Star.leobbs.net >
※From: 11.c218-184-166.ethome.net.tw