p4lang / p4factory

Compile P4 and run the P4 behavioral simulator
Apache License 2.0
174 stars 106 forks source link

To make docker-image is failed #126

Closed Muthuramane closed 8 years ago

Muthuramane commented 8 years ago

Hi,

I ran the command 'make docker-image' in the directory p4factory/targets/switch

I got the following error message,

Building docker image for target bm-switchlink .... ...... Copying python thrift files WARNING: No libraries specified INFO: Status: Preprocessing /tmp/tmpnRxo80.h INFO: Status: gcc -E -U GNUC -dD -I/usr/include -I/p4factory/submodules/switch/switchsai/submodules/SAI/inc "-Dinline=" "-Dinline=" "-Dextension=" "-Dconst=const" "-Dasm(x)=" "-Dasm(x)=" "-DCTYPESGEN=1" "/tmp/tmpnRxo80.h" INFO: Status: Parsing /tmp/tmpnRxo80.h INFO: Status: Processing description list. WARNING: Macro "SAI_MAX_FIRMWARE_PATH_NAME_LEN" depends on an unknown identifier "PATH_MAX". Macro "SAI_MAX_FIRMWARE_PATH_NAME_LEN" will not be output INFO: Status: Writing to /p4factory/targets/switch/tests/pd_thrift/switch_sai_thrift/sai_headers.py. INFO: Status: Wrapping complete. g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. make: * [/p4factory/targets/switch/build//bm/obj/dc.o] Error 4 make: * Waiting for unfinished jobs.... The command '/bin/sh -c cd /p4factory ; ./autogen.sh ; ./configure ; cd /p4factory/targets/switch ; make clean ; make -j4 bm-switchlink' returned a non-zero code: 2 make: *\ [docker-image] Error 1

My VM:

parallels@ubuntu:~/TestLogs$ df -h Filesystem Size Used Avail Use% Mounted on udev 485M 4.0K 485M 1% /dev tmpfs 99M 1.2M 98M 2% /run /dev/sda1 62G 20G 40G 33% / none 4.0K 0 4.0K 0% /sys/fs/cgroup none 5.0M 0 5.0M 0% /run/lock none 495M 148K 495M 1% /run/shm none 100M 64K 100M 1% /run/user Home 233G 92G 142G 40% /media/psf/Home Photo Library 233G 92G 142G 40% /media/psf/Photo Library /dev/sr0 86M 86M 0 100% /media/parallels/CDROM

Please, find the logs in the following link,

https://onedrive.live.com/redir?resid=83528C00681158AF!716&authkey=!ALdN4bh1GDUAh6c&ithint=file%2clog

Muthuramane commented 8 years ago

I got the following error while running the 'make bm-switchlink'

thrift -r --gen cpp --out /home/parallels/p4factory/targets/switch/build//bm/src /home/parallels/p4factory/targets/switch/build//bm/thrift/p4_pd_rpc.thrift && thrift -r --gen cpp --out /home/parallels/p4factory/targets/switch/build//bm/src /home/parallels/p4factory/targets/switch/build//bm/thrift/conn_mgr_pd_rpc.thrift && thrift -r --gen cpp --out /home/parallels/p4factory/targets/switch/build//bm/src /home/parallels/p4factory/targets/switch/build//bm/thrift/mc_pd_rpc.thrift && thrift -r --gen cpp --out /home/parallels/p4factory/targets/switch/build//bm/src /home/parallels/p4factory/targets/switch/build//bm/thrift/devport_mgr_pd_rpc.thrift && true [WARNING:/home/parallels/p4factory/targets/switch/build/bm/thrift/p4_pd_rpc.thrift:1391] Consider using the more efficient "binary" type instead of "list". Compiling : bm::pd_rpc_server.cpp Compiling : bm::p4_pd_rpc_constants.cpp Compiling : bm::conn_mgr_pd_rpc_constants.cpp Compiling : bm::mc_pd_rpc_constants.cpp Compiling : bm::devport_mgr_pd_rpc_constants.cpp Compiling : bm::res_constants.cpp Compiling : bm::p4_pd_rpc_types.cpp Compiling : bm::conn_mgr_pd_rpc_types.cpp Compiling : bm::mc_pd_rpc_types.cpp Compiling : bm::devport_mgr_pd_rpc_types.cpp Compiling : bm::res_types.cpp Compiling : bm::dc.cpp g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. make: *\ [/home/parallels/p4factory/targets/switch/build//bm/obj/dc.o] Error 4

And also I tried 'make bm-swtichapi'. The source file bm/dc.cpp is failed to compile.

parallels@ubuntu:~/p4factory/targets/switch$ make bm-switchapi Compiling : bm::dc.cpp g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. make: *\ [/home/parallels/p4factory/targets/switch/build//bm/obj/dc.o] Error 4

The dmesg o/p showing as below,

[11251.234931] Out of memory: Kill process 31776 (cc1plus) score 563 or sacrifice child [11251.234933] Killed process 31776 (cc1plus) total-vm:1310192kB, anon-rss:731552kB, file-rss:1560kB

Muthuramane commented 8 years ago

This problem fixed after increasing the VM's RAM Size from 1G to 4G.