簡體   English   中英

使用mingw-w64和./configure --host = i686-w64-mingw32.static,make失敗並且Makefile CC變量看起來錯誤

[英]Using mingw-w64 and ./configure --host=i686-w64-mingw32.static, make fails and Makefile CC variable looks wrong

我是新手。

我正在嘗試為Windows 10編譯iperf3,因為沒有iperf3的官方Windows發行版和學習經驗。 我正在嘗試通過Windows上Ubuntu上的Bash在新的Linux子系統Windows子系統上進行此操作,以獲取學習經驗。

我安裝了mingw-w64,它將為我提供交叉編譯所需的正確編譯器和環境: sudo apt-get install mingw-w64

這將兩個目錄放入我的/usr目錄: i686-w64-mingw32 x86_64-w64-mingw32

它還將一堆看起來像編譯器的東西放到/usr/bin

我從iperf3解壓縮了.tar.gz文件,並導航到其中。 然后,我運行./configure --host=i686-w64-mingw32.static ,它可以正確完成。

我注意到該命令的輸出行令人擔憂: checking for i686-w64-mingw32.static-gcc... no

我注意到MakefileCC變量設置為gcc ,這聽起來不像是正確的編譯器。

然后,我運行make 它失敗並顯示錯誤:

collect2: error: ld returned 1 exit status
make[2]: *** [iperf3] Error 1
make[2]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make: *** [all-recursive] Error 1

我還看到以下行: libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only

我認為./configure無法正常工作,因為它似乎沒有為我的--host參數找到正確的編譯器並將其放在Makefile

我究竟做錯了什么?

編輯:我將命令更改為./configure --host=i686-w64-mingw32每個注釋,它完成而沒有錯誤。 但是沒有創建任何makefile,因此make yield make: *** No targets specified and no makefile found. Stop. make: *** No targets specified and no makefile found. Stop.

我現在在做什么錯?

編輯2:看起來./configure實際上失敗了。 其輸出的最后一行是nanosleep() required for timing operations. ,這似乎意味着它缺少納米睡眠庫。

我如何獲得納米睡眠?

mingw不支持nanosleep。 因此使用它的程序無法使用mingw-w64進行編譯。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM