Cygwin上でコンパイル環境が構築できない。

1,153 views
Skip to first unread message

椿四十郎

unread,
Sep 21, 2015, 12:06:45 PM9/21/15
to KOZOS友の会

cygwin(マイコンボード付属CD)+windows10(32bit)上で開発を行なおうとしていますが、GCCのところで
コンパイルが通らない状況です。
buildutillについては通ったのですあ、以下のメッセージをみて何かアドバイスあったらよろしくお願いいたします。
連休中に楽しもうとしてコツコツ購入をすすめていたのですが、完全にいきずまり困っております。


(MAKE="make"; srcdir=`cd ./fixinc && ${PWDCMD-pwd}` ; \
CC="gcc"; CFLAGS="  -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error  -DHAVE_CONFIG_H -DGENERATOR_FILE"; LDFLAGS=""; \
WARN_CFLAGS="-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error"; LIBERTY=`${PWDCMD-pwd}`/"../libiberty/libiberty.a"; \
export MAKE srcdir CC CFLAGS LDFLAGS WARN_CFLAGS LIBERTY; \
cd ./fixinc && \
/bin/sh ${srcdir}/mkfixinc.sh i686-pc-cygwin h8300-unknown-elf)
constructing ../fixinc.sh for h8300-unknown-elf to run on i686-pc-cygwin
make TARGETS=oneprocess SHELL="/bin/sh" CC="gcc" CFLAGS=" -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE" LDFLAGS="" LIBERTY="/home/kazu/gcc-3.4.6/gcc/../libiberty/libiberty.a" install-bin
make[2]: Entering directory `/home/kazu/gcc-3.4.6/gcc/fixinc'
/bin/sh ./genfixes machname.h
No forbidden identifiers defined by this target
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include fixincl.c
fixincl.c: In function `test_test':
fixincl.c:631: warning: `res' might be used uninitialized in this function
fixincl.c: In function `start_fixer':
fixincl.c:1023: warning: `pz_cmd_save' might be used uninitialized in this function
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include fixtests.c
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include fixfixes.c
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include server.c
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include procopen.c
gcc -c -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include fixlib.c
gcc -DIN_GCC -DHAVE_CONFIG_H -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -DGENERATOR_FILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error -I. -I.. -I. -I./.. -I./../config -I./../../include  -o fixincl.exe fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o /home/kazu/gcc-3.4.6/gcc/../libiberty/libiberty.a
echo timestamp > full-stamp
./fixincl -v < /dev/null
'fixincl version 1.1'
chmod 755 ../fixinc.sh
make[2]: Leaving directory `/home/kazu/gcc-3.4.6/gcc/fixinc'
The directory that should contain system headers does not exist:
  /usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include
rm -rf include; mkdir include
chmod a+rx include
(TARGET_MACHINE='h8300-unknown-elf'; srcdir=`cd .; ${PWDCMD-pwd}`; \
SHELL='/bin/sh' ;\
export TARGET_MACHINE srcdir SHELL ; \
/bin/sh ./fixinc.sh `${PWDCMD-pwd}`/include /usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include ; \
rm -f include/syslimits.h; \
if [ -f include/limits.h ]; then \
  mv include/limits.h include/syslimits.h; \
else \
  cp ./gsyslimits.h include/syslimits.h; \
fi; \
chmod a+r include/syslimits.h)
Fixing headers into /home/kazu/gcc-3.4.6/gcc/include for h8300-unknown-elf target
echo timestamp > stmp-fixinc
if [ -f /usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include/limits.h ] ; then \
  cat ./limitx.h ./glimits.h ./limity.h > tmp-xlimits.h; \
else \
  cat ./glimits.h > tmp-xlimits.h; \
fi
mv tmp-xlimits.h xlimits.h
if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
for file in .. ./ginclude/float.h ./ginclude/iso646.h ./ginclude/stdarg.h ./ginclude/stdbool.h ./ginclude/stddef.h ./ginclude/varargs.h ./unwind.h ; do \
  if [ X$file != X.. ]; then \
    realfile=`echo $file | sed -e 's|.*/\([^/]*\)$|\1|'`; \
    echo timestamp > include/$realfile; \
    rm -f include/$realfile; \
    cp $file include; \
    chmod a+r include/$realfile; \
  fi; \
done
rm -f include/limits.h
cp xlimits.h include/limits.h
chmod a+r include/limits.h
rm -f include/README
cp ./README-fixinc include/README
chmod a+r include/README
echo timestamp > stmp-int-hdrs
if [ -d "/usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include" ]; \
then \
  CC="/home/kazu/gcc-3.4.6/gcc/xgcc -B/home/kazu/gcc-3.4.6/gcc/ -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include     -I. -I. -isystem include -isystem /usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include"; \
  export CC; \
  /bin/sh ./scan-types.sh "." >tmp-deduced.h; \
  mv tmp-deduced.h deduced.h; \
else \
  echo timestamp > deduced.h; \
fi
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I. -I./. -I./../include  gen-protos.c -o gen-protos.o
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I. -I./. -I./../include  scan.c -o scan.o
gcc   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE  -o gen-protos.exe \
  gen-protos.o scan.o ../libiberty/libiberty.a
sed -e s/TARGET_GETGROUPS_T/gid_t/ \
  deduced.h ./sys-protos.h > tmp-fixtmp.c
mv tmp-fixtmp.c fixtmp.c
/home/kazu/gcc-3.4.6/gcc/xgcc -B/home/kazu/gcc-3.4.6/gcc/ -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
  | sed -e 's/  / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  |  ./gen-protos >xsys-protos.hT
Funny input line: timestamp
gen-protos: 1346 entries 341 collisions
mv xsys-protos.hT xsys-protos.h
rm -rf fixtmp.c
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I. -I./. -I./../include  fix-header.c -o fix-header.o
gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I. -I./. -I./../include  scan-decls.c -o scan-decls.o
gcc   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE  -o fix-header.exe fix-header.o \
c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o libcpp.a ../libiberty/libiberty.a
if [ -f fixhdr.ready ] ; then \
        true; \
else \
        echo timestamp > fixhdr.ready; \
fi
if [ -f include/fixed ] ; then true; \
else \
  : This line works around a 'make' bug in BSDI 1.1.; \
  FIXPROTO_DEFINES=""; export FIXPROTO_DEFINES; \
  mkinstalldirs="/bin/sh ./mkinstalldirs"; \
    export mkinstalldirs; \
  if [ -d "/usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include" ]; then \
    /bin/sh ./fixproto include include /usr/local/lib/gcc/h8300-elf/3.4.6/../../../../h8300-elf/sys-include; \
    if [ $? -eq 0 ] ; then true ; else exit 1 ; fi ; \
  else true; fi; \
  echo timestamp > include/fixed; \
fi
echo timestamp > stmp-fixproto
objext='.o' \
LIB1ASMFUNCS='_cmpsi2 _ucmpsi2 _divhi3 _divsi3 _mulhi3 _mulsi3 _fixunssfsi_asm' \
LIB2FUNCS_ST='_eprintf __gcc_bcmp' \
LIBGCOV='_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta' \
LIB2ADD='./config/h8300/clzhi2.c ./config/h8300/ctzhi2.c ./config/h8300/parityhi2.c ./config/h8300/popcounthi2.c ./config/h8300/fixunssfsi.c' \
LIB2ADD_ST='' \
LIB2ADD_SH='' \
LIB2ADDEH='./unwind-dw2.c ./unwind-dw2-fde.c ./unwind-sjlj.c ./gthr-gnat.c ./unwind-c.c' \
LIB2ADDEHSTATIC='./unwind-dw2.c ./unwind-dw2-fde.c ./unwind-sjlj.c ./gthr-gnat.c ./unwind-c.c' \
LIB2ADDEHSHARED='./unwind-dw2.c ./unwind-dw2-fde.c ./unwind-sjlj.c ./gthr-gnat.c ./unwind-c.c' \
LIB2ADDEHDEP='unwind.inc unwind-dw2-fde.h' \
LIBUNWIND='' \
LIBUNWINDDEP='' \
SHLIBUNWIND_LINK='' \
SHLIBUNWIND_INSTALL='' \
FPBIT='fp-bit.c' \
FPBIT_FUNCS='_pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf' \
LIB2_DIVMOD_FUNCS='_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4' \
DPBIT='' \
DPBIT_FUNCS='_pack_df _unpack_df _addsub_df _mul_df _div_df _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df' \
TPBIT='' \
TPBIT_FUNCS='_pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf' \
MULTILIBS=`/home/kazu/gcc-3.4.6/gcc/xgcc -B/home/kazu/gcc-3.4.6/gcc/ -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include --print-multi-lib` \
EXTRA_MULTILIB_PARTS='crti.o crtn.o crtbegin.o crtend.o' \
SHLIB_LINK='' \
SHLIB_INSTALL='' \
SHLIB_EXT='' \
SHLIB_MULTILIB='' \
SHLIB_MKMAP='' \
SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
mkinstalldirs='/bin/sh ./mkinstalldirs' \
  /bin/sh mklibgcc > tmp-libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="ansidecl.h" DEFINES="" \
/bin/sh ./mkconfig.sh tconfig.h
make \
  CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  " \
  CONFIG_H="config.h  auto-host.h ./../include/ansidecl.h ./config/i386/xm-cygwin.h" \
  MAKEOVERRIDES= \
  -f libgcc.mk all
make[2]: Entering directory `/home/kazu/gcc-3.4.6/gcc'
for d in libgcc h8300h libgcc/h8300h h8300s libgcc/h8300s h8300h/normal libgcc/h8300h/normal h8300h/int32 libgcc/h8300h/int32 h8300h/normal/int32 libgcc/h8300h/normal/int32 h8300s/normal libgcc/h8300s/normal h8300s/int32 libgcc/h8300s/int32 h8300s/normal/int32 libgcc/h8300s/normal/int32; do \
  if [ -d $d ]; then true; else /bin/sh ./mkinstalldirs $d; fi; \
done
mkdir -p -- libgcc
mkdir -p -- h8300h
mkdir -p -- libgcc/h8300h
mkdir -p -- h8300s
mkdir -p -- libgcc/h8300s
mkdir -p -- h8300h/normal
mkdir -p -- libgcc/h8300h/normal
mkdir -p -- h8300h/int32
mkdir -p -- libgcc/h8300h/int32
mkdir -p -- h8300h/normal/int32
mkdir -p -- libgcc/h8300h/normal/int32
mkdir -p -- h8300s/normal
mkdir -p -- libgcc/h8300s/normal
mkdir -p -- h8300s/int32
mkdir -p -- libgcc/h8300s/int32
mkdir -p -- h8300s/normal/int32
mkdir -p -- libgcc/h8300s/normal/int32
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/kazu/gcc-3.4.6/gcc/xgcc -B/home/kazu/gcc-3.4.6/gcc/ -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -DDF=SF -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I -I. -I./ -I./../include  -DL_cmpsi2 -xassembler-with-cpp -c ./config/h8300/lib1funcs.asm -o libgcc/./_cmpsi2.o
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s: Assembler messages:
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:6: Error: no such instruction: `libgcc routines for the Renesas H8/300 CPU.'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:7: Error: no such instruction: `contributed by Steve Chamberlain<s...@cygnus.com>'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:8: Error: no such instruction: `optimizations by Toshiyasu Morita<toshiyas...@renesas.com>'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:14: Error: invalid character '.' in mnemonic
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:15: Error: no such instruction: `bne .L2'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:16: Error: invalid character '.' in mnemonic
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:17: Error: no such instruction: `bne .L4'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:18: Error: invalid character '.' in mnemonic
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:19: Error: no such instruction: `rts'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:21: Error: no such instruction: `bgt .L5'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:23: Error: invalid character '.' in mnemonic
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:24: Error: no such instruction: `rts'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:26: Error: no such instruction: `bls .L3'
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:28: Error: invalid character '.' in mnemonic
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:29: Error: no such instruction: `rts'
make[2]: *** [libgcc/./_cmpsi2.o] Error 1
make[2]: Leaving directory `/home/kazu/gcc-3.4.6/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/kazu/gcc-3.4.6/gcc'
make: *** [all-gcc] Error 2

jg1uaa

unread,
Sep 21, 2015, 1:53:02 PM9/21/15
to KOZOS友の会
笹野と申します。

> ./config/h8300/lib1funcs.asm -o libgcc/./_cmpsi2.o

「h8300 lib1funcs.asm」をキーワードにぐぐってみましたが、
この辺りの一連のやりとりが参考になりませんかね?

https://www.toppers.jp/TOPPERS-USERS/200509/msg00039.html

ざっくり要約すると、binutilsのインストールが上手くいっていないんじゃないの?
という話になるでしょうか。

手元にあるのはCygwinではなくOpenBSDですが、こんな感じに
binutils/gccの実行用バイナリがインストールされています。

- /usr/local/h8300-elf/bin/にar, as, nmその他色々が入っている
- /usr/local/bin/にh8300-elf-ar, h8300-elf-as, h8300-elf-nmその他色々が(略

#ハズしているかもしれないので、その場合は他の詳しい方にお任せしちゃいます。
--
SASANO Takayoshi <u...@uaa.org.uk>

TY

unread,
Sep 21, 2015, 7:09:48 PM9/21/15
to kozos_t...@googlegroups.com
やまちゅうです、、

(以下はCygwinが正しくインストールされている前提で書いています。)

ここまでの経緯の確認方法は、

1)binutilをコンパイルしたディレクトリに、"config.log" というファイルがあると思いますが、その最初10行目ぐらいの

../binutils-2.23/configure --prefix=/usr/local/h8 --target=h8300-elf

というようなconfigureを実行した時のログを確認、prefixは意図しているディレクトリを指しているか、targetはh8300-elfになっているか?

2)(prefixが指しているディレクトリ)/bin にh8300-elf-asや、h8300-elf-nmなどがあるか?

3) 2)の確認ができたら、新規のシェルで "h8300-elf-as --version"
の様にコマンド実行して、正しい結果が返ってくるか? 返ってない場合は、(prefixが指しているディレクトリ)/bin で同じことをして
正しい結果が返ってくるか?
(実行パスの確認と、コマンドの正しいインストールの確認、とそれらの問題の切り分け)

4)gccをコンパイルしたディレクトリにも "config.log" ファイルがありますが、その中のconfigureを実行した時のログ
../gcc-4.9.2/configure --prefix=/usr/local/h8 --target=h8300-elf
--disable-nls --enable-languages=c --with-newlib(指定したオプションによって変わってきます)

のprefixとtargetを確認して、意図した物になっているか?

5)gccのconfigureを実行すると、最後の方で(h8300-elf-)as,nm,ldなどのチェックをしているので、それが正しいものを見に行っているか?

などでしょうか?

なぞっただけで上手く行ってしまうと得るものが少ないので、エラーも楽しむ、くらいの力具合でがんばってみてください。

2015年9月22日 2:53 jg1uaa <jg1...@gmail.com>:
> --
> このメールは Google グループのグループ「KOZOS友の会」に登録しているユーザーに送られています。
> このグループから退会し、グループからのメールの配信を停止するには
> kozos_tomonok...@googlegroups.com にメールを送信してください。
> その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。

TY

unread,
Sep 21, 2015, 8:24:08 PM9/21/15
to kozos_t...@googlegroups.com
ちょっと気になっているのですが、最初の投稿で "makefileの設定”云々と書かれていたのですが、ビルドの際に

configure xxxx
make
make install

で、ビルドされてますよね? makefile直接いじってmakeではないですよね?

2015年9月22日 8:09 TY <yama...@gmail.com>:

椿四十郎

unread,
Sep 21, 2015, 8:53:54 PM9/21/15
to KOZOS友の会
やまちゅう様

お忙しい中、わざわざ詳細な解説ありがとうございます。
本件、何度か入れなおしているのですが、makefilek自体は修正していません。
結局、笹野様のいわれているようにbuildutilについて、--disable-werrorオプションでちゃんとErrorが消えないのが
問題なのではと思い直しております。
・・・・こんなに難しい環境設定とは想像しておりませんした。


2015年9月22日火曜日 9時24分08秒 UTC+9 やまちゅう:

椿四十郎

unread,
Sep 21, 2015, 11:34:09 PM9/21/15
to KOZOS友の会
笹野様
ご指摘のほどありがとうございます。
私のほうはボードに付属するCygwinで構築しているのですが、Cygwinごと全部初期化して入れなおしておりますが
うまくいきません。
8cmCD-ROMで2013/4月と記述がある付属CD-ROMから入力しているのですが・・・・・


2015年9月22日火曜日 2時53分02秒 UTC+9 jg1uaa:

椿四十郎

unread,
Sep 22, 2015, 9:54:51 PM9/22/15
to KOZOS友の会
自己レスです。

いろいろ試したのですが、本の通りに入力した場合ではことごとく環境が構築できませんでした。
逆に言えば皆様どうやって環境を構築しているのでしょうか?
残念を通りこして非常に悔しいです。


2015年9月22日火曜日 1時06分45秒 UTC+9 椿四十郎:
/cygdrive/c/Users/kazu/AppData/Local/Temp/ccsN2nLs.s:8: Error: no such instruction: `optimizations by Toshiyasu Morita<toshiyasu.morita@renesas.com>'

TY

unread,
Sep 22, 2015, 11:24:30 PM9/22/15
to kozos_t...@googlegroups.com
こんにちは、やまちゅうです、、、

回答の最初にも書いたのですが、Cygwin + Win10の組み合わせの確認はされましたか?

おそらく秋月がh8/3069Fボードを発売したのは相当前で、ボードの開発環境に付属しているCygwinが、プラットフォームとしてWin64bitの事など想定されていないと思われます。(こまめに秋月が開発環境のアップデートをしているとも考えがたいですし、、)

先ずはそこを押さえてからいろいろな事を始められた方が、トラブルもストレスも少ないと思います。

クロスプラットフォームでソフトウェアの開発をやられている方々、特にgccをベースに開発をされている方々はlinuxなり、*BSDを使われている方が多いのではないでしょうか?そちらも検討されてはいかがですか?
>> Morita<toshiyas...@renesas.com>'

椿四十郎

unread,
Sep 22, 2015, 11:56:33 PM9/22/15
to KOZOS友の会
やまちゅう様

すいません、4日もかけていまだにbuildutilsすらコンパイルできないので頭に血が上っておりました。
お気に障るような書き込みをして申し訳ありませんでした。


2015年9月23日水曜日 12時24分30秒 UTC+9 やまちゅう:

simotin

unread,
Sep 23, 2015, 8:45:46 AM9/23/15
to KOZOS友の会
宮崎と申します。

windwos7ですが、以前cygwin(32bit-x86版)で開発環境を構築できていました。

ただし、cygwinはサイトからダウンロードしてインストールしたものです。


パッケージはtar,gcc,vi等必要な物を適当にインストールしていました。

現在は64bit版のcygwinを使っているので試してみましたがbinutils-2.19.1のビルドはできました。

ただし、gcc-3.4.6は失敗しました。
$ ./configure --target=h8300-elf --disable-nls --disable-threads --disable-shared --enable-languages=c --disable-werror
loading cache ./config.cache
checking host system type... ./config.guess: unable to guess system type

This script, last modified 2004-02-16, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from


If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-...@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2004-02-16

uname -m = x86_64
uname -r = 2.0.4(0.287/5/3)
uname -s = CYGWIN_NT-6.1
uname -v = 2015-06-09 12:22

/usr/bin/uname -p = unknown
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = x86_64
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = x86_64
UNAME_RELEASE = 2.0.4(0.287/5/3)
UNAME_SYSTEM  = CYGWIN_NT-6.1
UNAME_VERSION = 2015-06-09 12:22
configure: error: can not guess host type; you must specify one


gcc-3.4.6もx86版のcygwinではビルドできたので試してみられてはいかがでしょうか。

binutilsもgccも書籍にもあるように./configureで --disable-werror
がないとコンパイル時点でエラーになっていたと思います。


2015年9月23日水曜日 12時56分33秒 UTC+9 椿四十郎:

SAKAI Hiroaki

unread,
Sep 28, 2015, 8:01:22 AM9/28/15
to kozos_t...@googlegroups.com, ko...@kozos.jp
坂井です.

以下,教えていただくことは可能でしょうか.

・binutils,gccをビルドした際に実行したコマンドを,
順番通りにコピペしてそのまま教えてください.

・やまちゅうさんの指摘にあるように,ビルドしたディレクトリに
config.log というログが残っているかと思いますが,その中の
configure を実行した際のログ部分.
(configure への指定オプションにミスが無いか確認したいです.
たとえば --enable-languages=c を --enable-language=c と記述している
(「languages」の終端の「s」が無い)などが見られることがあります)

・--prefix でインストール先などを指定しているか?
(そしてインストール先に,h8300-elf-as などがあるか?)
インストール先を指定した際に,そこにパスが通っていなくてコマンドが
実行できずgccがビルドできない,ということがあるようです.



<3138c91c-520f-4178...@googlegroups.com>の記事において
kazunob...@gmail.comさんは書きました。

>> やまちゅう様
>>
>> お忙しい中、わざわざ詳細な解説ありがとうございます。
>> 本件、何度か入れなおしているのですが、makefilek自体は修正していません。
>> 結局、笹野様のいわれているようにbuildutilについて、--disable-werrorオプションでちゃんとErrorが消えないのが
>> 問題なのではと思い直しております。
>> ・・・・こんなに難しい環境設定とは想像しておりませんした。
>>
>>
>> 2015年9月22日火曜日 9時24分08秒 UTC+9 やまちゅう:
>> >
>> > ちょっと気になっているのですが、最初の投稿で "makefileの設定”云々と書かれていたのですが、ビルドの際に
>> >
>> > configure xxxx
>> > make
>> > make install
>> >
>> > で、ビルドされてますよね? makefile直接いじってmakeではないですよね?
>> >
>> > 2015年9月22日 8:09 TY <yama...@gmail.com <javascript:>>:
>> > > やまちゅうです、、
>> > >
>> > > (以下はCygwinが正しくインストールされている前提で書いています。)
>> > >
>> > > ここまでの経緯の確認方法は、
>> > >
>> > > 1)binutilをコンパイルしたディレクトリに、"config.log" というファイルがあると思いますが、その最初10行目ぐらいの
>> > >
>> > > ../binutils-2.23/configure --prefix=/usr/local/h8 --target=h8300-elf
>> > >
>> > >
>> > というようなconfigureを実行した時のログを確認、prefixは意図しているディレクトリを指しているか、targetはh8300-elfになっているか?
>> >
>> > >
>> > > 2)(prefixが指しているディレクトリ)/bin にh8300-elf-asや、h8300-elf-nmなどがあるか?
>> > >
>> > > 3) 2)の確認ができたら、新規のシェルで "h8300-elf-as --version"
>> > > の様にコマンド実行して、正しい結果が返ってくるか? 返ってない場合は、(prefixが指しているディレクトリ)/bin で同じことをして
>> > > 正しい結果が返ってくるか?
>> > > (実行パスの確認と、コマンドの正しいインストールの確認、とそれらの問題の切り分け)
>> > >
>> > > 4)gccをコンパイルしたディレクトリにも "config.log" ファイルがありますが、その中のconfigureを実行した時のログ
>> > > ../gcc-4.9.2/configure --prefix=/usr/local/h8 --target=h8300-elf
>> > > --disable-nls --enable-languages=c --with-newlib(指定したオプションによって変わってきます)
>> > >
>> > > のprefixとtargetを確認して、意図した物になっているか?
>> > >
>> > >
>> > 5)gccのconfigureを実行すると、最後の方で(h8300-elf-)as,nm,ldなどのチェックをしているので、それが正しいものを見に行っているか?
>> >
>> > >
>> > > などでしょうか?
>> > >
>> > > なぞっただけで上手く行ってしまうと得るものが少ないので、エラーも楽しむ、くらいの力具合でがんばってみてください。
>> > >
>> > > 2015年9月22日 2:53 jg1uaa <jg1...@gmail.com <javascript:>>:
>> > >> 笹野と申します。
>> > >>
>> > >>> ./config/h8300/lib1funcs.asm -o libgcc/./_cmpsi2.o
>> > >>
>> > >> 「h8300 lib1funcs.asm」をキーワードにぐぐってみましたが、
>> > >> この辺りの一連のやりとりが参考になりませんかね?
>> > >>
>> > >> https://www.toppers.jp/TOPPERS-USERS/200509/msg00039.html
>> > >>
>> > >> ざっくり要約すると、binutilsのインストールが上手くいっていないんじゃないの?
>> > >> という話になるでしょうか。
>> > >>
>> > >> 手元にあるのはCygwinではなくOpenBSDですが、こんな感じに
>> > >> binutils/gccの実行用バイナリがインストールされています。
>> > >>
>> > >> - /usr/local/h8300-elf/bin/にar, as, nmその他色々が入っている
>> > >> - /usr/local/bin/にh8300-elf-ar, h8300-elf-as, h8300-elf-nmその他色々が(略
>> > >>
>> > >> #ハズしているかもしれないので、その場合は他の詳しい方にお任せしちゃいます。
>> > >> --
>> > >> SASANO Takayoshi <u...@uaa.org.uk <javascript:>>
>> > >>
>> > >> --
>> > >> このメールは Google グループのグループ「KOZOS友の会」に登録しているユーザーに送られています。
>> > >> このグループから退会し、グループからのメールの配信を停止するには
>> > >> kozos_tomonok...@googlegroups.com <javascript:> にメールを送信してください。
>> > >> その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。
>> >
>>
>> --
>> このメールは Google グループのグループ「KOZOS友の会」の登録者に送られています。
Reply all
Reply to author
Forward
0 new messages