MaverickTse/lsw-build2

bzip2のmakeに失敗する

Closed this issue · 1 comments

./buildmypkg.sh

を実行すると

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: bzip2.o: bad reloc address 0x0 in section `.data'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile:108: ターゲット 'bzip2.exe' のレシピで失敗しました
make: *** [bzip2.exe] エラー 1

となります。これはbzip2のmakefile側の問題でしょうか?それとも、buildmypkg.shの問題でしょうか?

全文

$ ./buildmypkg.sh
 Downloading Patch files from MSYS2 Project(GitHub)
+ cd /home/yumetodo
+ '[' '!' -d patches ']'
+ mkdir patches
+ cd patches
+ '[' '!' -d .git ']'
+ git clone -v --progress --config core.autocrlf=false https://github.com/Alexpux/MINGW-packages.git ./
Cloning into '.'...
POST git-upload-pack (190 bytes)
remote: Counting objects: 18832, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 18832 (delta 0), reused 0 (delta 0), pack-reused 18827
Receiving objects: 100% (18832/18832), 9.58 MiB | 167.00 KiB/s, done.
Resolving deltas: 100% (9968/9968), done.
Checking connectivity... done.
Checking out files: 100% (2497/2497), done.
+ git pull -v --progress
From https://github.com/Alexpux/MINGW-packages
 = [up to date]      master     -> origin/master
Already up-to-date.
+ cd /home/yumetodo
 Building BZip2
--2015-03-03 12:26:35--  http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
www.bzip.org (www.bzip.org) をDNSに問いあわせています... 46.235.226.80, 2a00:1098:0:86:1000:44:0:80
www.bzip.org (www.bzip.org)|46.235.226.80|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 782025 (764K) [application/x-gzip]
`bzip2-1.0.6.tar.gz' に保存中

bzip2-1.0.6.tar.gz               100%[==========================================================>] 763.70K   710KB/s 時間 1.1s

2015-03-03 12:26:40 (710 KB/s) - `bzip2-1.0.6.tar.gz' へ保存完了 [782025/782025]

bzip2-1.0.6/blocksort.c
bzip2-1.0.6/huffman.c
bzip2-1.0.6/crctable.c
bzip2-1.0.6/randtable.c
bzip2-1.0.6/compress.c
bzip2-1.0.6/decompress.c
bzip2-1.0.6/bzlib.c
bzip2-1.0.6/bzip2.c
bzip2-1.0.6/bzip2recover.c
bzip2-1.0.6/bzlib.h
bzip2-1.0.6/bzlib_private.h
bzip2-1.0.6/Makefile
bzip2-1.0.6/LICENSE
bzip2-1.0.6/bzip2.1
bzip2-1.0.6/bzip2.1.preformatted
bzip2-1.0.6/bzip2.txt
bzip2-1.0.6/words0
bzip2-1.0.6/words1
bzip2-1.0.6/words2
bzip2-1.0.6/words3
bzip2-1.0.6/sample1.ref
bzip2-1.0.6/sample2.ref
bzip2-1.0.6/sample3.ref
bzip2-1.0.6/sample1.bz2
bzip2-1.0.6/sample2.bz2
bzip2-1.0.6/sample3.bz2
bzip2-1.0.6/dlltest.c
bzip2-1.0.6/manual.html
bzip2-1.0.6/manual.pdf
bzip2-1.0.6/manual.ps
bzip2-1.0.6/README
bzip2-1.0.6/README.COMPILATION.PROBLEMS
bzip2-1.0.6/README.XML.STUFF
bzip2-1.0.6/CHANGES
bzip2-1.0.6/libbz2.def
bzip2-1.0.6/libbz2.dsp
bzip2-1.0.6/dlltest.dsp
bzip2-1.0.6/makefile.msc
bzip2-1.0.6/unzcrash.c
bzip2-1.0.6/spewG.c
bzip2-1.0.6/mk251.c
bzip2-1.0.6/bzdiff
bzip2-1.0.6/bzdiff.1
bzip2-1.0.6/bzmore
bzip2-1.0.6/bzmore.1
bzip2-1.0.6/bzgrep
bzip2-1.0.6/bzgrep.1
bzip2-1.0.6/Makefile-libbz2_so
bzip2-1.0.6/bz-common.xsl
bzip2-1.0.6/bz-fo.xsl
bzip2-1.0.6/bz-html.xsl
bzip2-1.0.6/bzip.css
bzip2-1.0.6/entities.xml
bzip2-1.0.6/manual.xml
bzip2-1.0.6/format.pl
bzip2-1.0.6/xmlproc.sh
patching file bzip2recover.c
patching file bzip2.c
patching file bzgrep
patching file bzip2.c
patching file bzip2recover.c
Hunk #4 succeeded at 503 (offset 1 line).
patching file bzlib.c
patching file bzlib.h
patching file bzmore
patching file Makefile.in
patching file README.CYGMING
patching file aclocal.m4
patching file configure.ac
patching file libbz2.def.in
patching file bzip2.pc.in
patching file bzip2.1
patching file bzip2.c
Hunk #1 succeeded at 53 (offset -92 lines).
Hunk #2 succeeded at 210 with fuzz 2 (offset -92 lines).
Hunk #3 succeeded at 336 (offset -91 lines).
Hunk #4 succeeded at 349 (offset -91 lines).
Hunk #5 succeeded at 372 (offset -91 lines).
Hunk #6 succeeded at 472 with fuzz 2 (offset -87 lines).
Hunk #7 succeeded at 481 (offset -87 lines).
Hunk #8 succeeded at 509 (offset -87 lines).
Hunk #9 succeeded at 1858 (offset -69 lines).
Hunk #10 succeeded at 1936 (offset -69 lines).
Hunk #11 succeeded at 1973 (offset -69 lines).
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... no, using cp -pR
checking whether we are building for an MS-Windows host... yes
checking whether we are building for a cygwin host... no
checking for make goal to build shared libraries... none
checking for API version of DLL shared libraries... 1
checking for base name of DLL shared libraries... libbz2
checking for ar... ar
checking for ranlib... ranlib
checking for flags to pass to ar... cq
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bzip2.pc
cmp > /dev/null 2>&1 ./libbz2.def libbz2.def \
  || rm -f libbz2.def
rm -f *.o libbz2*.a libbz2*.dll  \
bzip2.exe bzip2recover.exe \
sample1.rb2 sample2.rb2 sample3.rb2 \
sample1.tst sample2.tst sample3.tst
gcc -static -D_FILE_OFFSET_BITS=64 -c -ohuffman.o huffman.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -ocrctable.o crctable.c

If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.

Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.

gcc -static -D_FILE_OFFSET_BITS=64 -c -o blocksort.o blocksort.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -orandtable.o randtable.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -ocompress.o compress.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -odecompress.o decompress.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -obzlib.o bzlib.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -obzip2.o bzip2.c
gcc -static -D_FILE_OFFSET_BITS=64 -c -obzip2recover.o bzip2recover.c
rm -f libbz2.a
ar cq libbz2.a blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
gcc -static -D_FILE_OFFSET_BITS=64  -o bzip2recover.exe bzip2recover.o
ranlib libbz2.a
gcc -static -D_FILE_OFFSET_BITS=64  -o bzip2.exe bzip2.o -L. -lbz2
bzip2.o:bzip2.c:(.text+0x307): undefined reference to `ftello'
bzip2.o:bzip2.c:(.text+0x548): undefined reference to `ftello'
bzip2.o:bzip2.c:(.text+0x562): undefined reference to `ftello'
bzip2.o:bzip2.c:(.text+0x94d): undefined reference to `ftello'
bzip2.o:bzip2.c:(.text+0x96b): undefined reference to `fseeko'
bzip2.o:bzip2.c:(.text+0x976): undefined reference to `ftello'
bzip2.o:bzip2.c:(.text+0x99f): undefined reference to `fseeko'
bzip2.o:bzip2.c:(.text+0xb89): undefined reference to `ftello'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: bzip2.o: bad reloc address 0x0 in section `.data'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile:108: ターゲット 'bzip2.exe' のレシピで失敗しました
make: *** [bzip2.exe] エラー 1

Fixed in commit fa58be1
Now abort the script if not using the MINGW32 mode