環境構築がうまく出来ません。よろしければ助けてください。 2

1,312 views
Skip to first unread message

s121...@gmail.com

unread,
Aug 21, 2016, 6:00:53 AM8/21/16
to KOZOS友の会

すいません、なぜか返信できず新しくポストしてしまいました。

返信くださりありがとうございます!
h8300-elf-gccがビルドされていない、もしくはインストールされていないということでもう一度見直してみました。

./configureのオプションを「--disable-nls」に変更しました
その実行結果が下5行になります
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile

その後のsu makeの実行結果です
make[2]: *** [doc/cpp.info] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

その後のsu make installの結果です
make[2]: *** [doc/cpp.info] Error 1
make[1]: *** [install-gcc] Error 2
make: *** [install] Error 2

その後の/src/01/bootlandでmake(ビルドとフラッシュROMへの書き込み)の実行結果になります
~/12step/tools/bin/h8300-elf-gcc -c -Wall -mh -nostdinc -nostdlib -fno-builtin -I -Os -DKZLOAD vector.c
/bin/sh: /var/root/12step/tools/bin/h8300-elf-gcc: No such file or directory
make: *** [vector.o] Error 127

これらを試してみましたがダメでしたので書籍のgcc-3.4.6を利用した結果が以下になります
  1. http://core.ring.gr.jp/pub/GNU/gcc/gcc-3.4.6/ 
  2. gcc-3.4.6.tar.gz を入手
  3. tar xvzf gcc-3.4.6.tar.gz
  4. cd gcc-3.4.6
  5. ./configure --target=h8300-elf --disable-nls --disable-threads --disable-shared --enable-languages=c
  6. make 
    1. make[2]: *** [libgcc/./_muldi3.o] Error 1
    2. make[1]: *** [stmp-multilib] Error 2
    3. make: *** [all-gcc] Error 2
  7. make install
    1. make[2]: *** [libgcc/./_muldi3.o] Error 1
    2. make[1]: *** [stmp-multilib] Error 2
    3. make: *** [install-gcc] Error 2
  8. cd ~/12step/src/01/bootload
  9. ls
    1. Makefile  ld.scr    lib.h     serial.c  startup.s
    2. defines.h lib.c     main.c    serial.h  vector.c
  10. make
    1. ~/12step/tools/bin/h8300-elf-gcc -c -Wall -mh -nostdinc -nostdlib -fno-builtin -I -Os -DKZLOAD vector.c
    2. /bin/sh: /var/root/12step/tools/bin/h8300-elf-gcc: No such file or directory
    3. make: *** [vector.o] Error 127

という結果になりました。すいません。


yuuki

unread,
Aug 21, 2016, 10:47:58 AM8/21/16
to kozos_t...@googlegroups.com
横から失礼致します。

占部優希と申します。

◆状況
gccのコンパイルに失敗しています。
MacOSの場合、gcc3.4系よりもgcc4系の方が良かったような気がします。


◆対応方法
1)Yosemite環境での環境構築を諦め、VM環境で構築する
以下、以前坂井様が本MLにPostしたメールからの抜粋です。

>>  (サポートページのトップ)
>> http://kozos.jp/books/makeos/
>>
>> (VMイメージの説明)
>> http://kozos.jp/books/makeos/#vmimage


2)頑張ってYosemite環境で構築する
以下、Mavericksでの環境構築時のメモです。
参考になるかもしれないので貼付けておきます。

■Mavericks用Xcode版gcc(gcc-4.2.1 Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn))
$ sudo mkdir -p /opt/12StepOS/tools

◆binutils-2.19.1
$ CFLAGS="-Wno-error=deprecated-declarations -Wno-sometimes-uninitialized -Wno-string-plus-int -Wno-empty-body -Wno-constant-logical-operand -Wno-self-assign" ./configure  --target=h8300-elf  --disable-nls --prefix=/opt/12StepOS/tools
$ make
$ sudo  make install

◆gmp-5.1.3
$ ./configure --prefix=/opt12StepOS/tools
$ make
$ sudo  make install

◆mpfr-3.1.2
$ ./configure --prefix=/opt/12StepOS/tools --with-gmp=/opt/12StepOS/tools
$ make
$ sudo  make install

◆mpc-1.0.2
$ ./configure --prefix=/opt/12StepOS/tools  --with-mpfr=/opt/12StepOS/tools --with-gmp=/opt/12StepOS/tools
$ make
$ sudo  make install

◆gcc-4.8.2
$ mkdir build
$ cd build
$ CFLAGS=-Wno-implicit-function-declaration ../gcc-4.8.2/configure --prefix=/opt/12StepOS/tools --target=h8300-elf --disable-nls --disable-threads --disable-shared --disable-libssp --enable-languages=c  --with-mpfr=/opt/12StepOS/tools  --with-gmp=/opt/12StepOS/tools   --with-mpc=/opt/12StepOS/tools
$ make
$ sudo  make install

何かの助けになれば幸いです。
以上です。

占部優希 <yuki....@gmail.com>


2016年8月21日 19:00 <s121...@gmail.com>:

--
このメールは Google グループのグループ「KOZOS友の会」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには kozos_tomonokai+unsubscribe@googlegroups.com にメールを送信してください。
その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。

Reply all
Reply to author
Forward
0 new messages