{"action":"created","issue":{"url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/3","repository_url":"https://api.github.com/repos/pimoroni/vl53l1x-python","labels_url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/3/comments","events_url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/3/events","html_url":"https://github.com/pimoroni/vl53l1x-python/issues/3","id":339832257,"node_id":"MDU6SXNzdWUzMzk4MzIyNTc=","number":3,"title":"(install) command 'arm-linux-gnueabihf-gcc' failed with exit status 1","user":{"login":"ash73","id":24896865,"node_id":"MDQ6VXNlcjI0ODk2ODY1","avatar_url":"https://avatars3.githubusercontent.com/u/24896865?v=4","gravatar_id":"","url":"https://api.github.com/users/ash73","html_url":"https://github.com/ash73","followers_url":"https://api.github.com/users/ash73/followers","following_url":"https://api.github.com/users/ash73/following{/other_user}","gists_url":"https://api.github.com/users/ash73/gists{/gist_id}","starred_url":"https://api.github.com/users/ash73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ash73/subscriptions","organizations_url":"https://api.github.com/users/ash73/orgs","repos_url":"https://api.github.com/users/ash73/repos","events_url":"https://api.github.com/users/ash73/events{/privacy}","received_events_url":"https://api.github.com/users/ash73/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-10T13:02:03Z","updated_at":"2018-07-13T13:19:51Z","closed_at":null,"author_association":"NONE","body":"Hi, I cloned the git repository to my rPi2 and entered:\r\nsudo python setup.py install\r\n\r\nAfter doing some work it generates the error:\r\ncommand 'arm-linux-gnueabihf-gcc' failed with exit status 1\r\n\r\nThe full output is:\r\nrunning install\r\nrunning bdist_egg\r\nrunning egg_info\r\ncreating python/VL53L1X.egg-info\r\nwriting python/VL53L1X.egg-info/PKG-INFO\r\nwriting top-level names to python/VL53L1X.egg-info/top_level.txt\r\nwriting dependency_links to python/VL53L1X.egg-info/dependency_links.txt\r\nwriting manifest file 'python/VL53L1X.egg-info/SOURCES.txt'\r\nreading manifest file 'python/VL53L1X.egg-info/SOURCES.txt'\r\nreading manifest template 'MANIFEST.in'\r\nwriting manifest file 'python/VL53L1X.egg-info/SOURCES.txt'\r\ninstalling library code to build/bdist.linux-armv7l/egg\r\nrunning install_lib\r\nrunning build_py\r\ncreating build\r\ncreating build/lib.linux-armv7l-2.7\r\ncopying python/VL53L1X.py -> build/lib.linux-armv7l-2.7\r\nrunning build_ext\r\nbuilding 'vl53l1x_python' extension\r\ncreating build/temp.linux-armv7l-2.7\r\ncreating build/temp.linux-armv7l-2.7/api\r\ncreating build/temp.linux-armv7l-2.7/api/core\r\ncreating build/temp.linux-armv7l-2.7/api/platform\r\ncreating build/temp.linux-armv7l-2.7/python_lib\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_api_calibration.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_api_calibration.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_core.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_core.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_core_support.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_core_support.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_api_core.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_api_core.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_api_preset_modes.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_api_preset_modes.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_silicon_core.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_silicon_core.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_register_funcs.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_register_funcs.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_wait.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_wait.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_error_strings.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_error_strings.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_api_strings.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_api_strings.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/core/vl53l1_api.c -o build/temp.linux-armv7l-2.7/api/core/vl53l1_api.o\r\narm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -Iapi/core -Iapi/platform -I/usr/include/python2.7 -c api/platform/vl53l1_platform.c -o build/temp.linux-armv7l-2.7/api/platform/vl53l1_platform.o\r\napi/platform/vl53l1_platform.c:279:1: warning: multi-line comment [-Wcomment]\r\n //#define trace_print(level, ...) \\\r\n ^\r\napi/platform/vl53l1_platform.c:283:1: warning: multi-line comment [-Wcomment]\r\n //#define trace_i2c(...) \\\r\n ^\r\napi/platform/vl53l1_platform.c: In function ‘VL53L1_WaitValueMaskEx’:\r\napi/platform/vl53l1_platform.c:321:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode\r\n  for(int32_t x = 0; x < attempts; x++){\r\n  ^\r\napi/platform/vl53l1_platform.c:321:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code\r\nerror: command 'arm-linux-gnueabihf-gcc' failed with exit status 1\r\n\r\n\r\nPlease help."},"comment":{"url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/comments/404831275","html_url":"https://github.com/pimoroni/vl53l1x-python/issues/3#issuecomment-404831275","issue_url":"https://api.github.com/repos/pimoroni/vl53l1x-python/issues/3","id":404831275,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDgzMTI3NQ==","user":{"login":"Gadgetoid","id":1746967,"node_id":"MDQ6VXNlcjE3NDY5Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1746967?v=4","gravatar_id":"","url":"https://api.github.com/users/Gadgetoid","html_url":"https://github.com/Gadgetoid","followers_url":"https://api.github.com/users/Gadgetoid/followers","following_url":"https://api.github.com/users/Gadgetoid/following{/other_user}","gists_url":"https://api.github.com/users/Gadgetoid/gists{/gist_id}","starred_url":"https://api.github.com/users/Gadgetoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gadgetoid/subscriptions","organizations_url":"https://api.github.com/users/Gadgetoid/orgs","repos_url":"https://api.github.com/users/Gadgetoid/repos","events_url":"https://api.github.com/users/Gadgetoid/events{/privacy}","received_events_url":"https://api.github.com/users/Gadgetoid/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T13:19:51Z","updated_at":"2018-07-13T13:19:51Z","author_association":"MEMBER","body":"You could try adding it to the Makefile, IE:\r\n\r\n```makefile\r\n.PHONY: clean lib\r\n\r\nSRC = api\r\nLIB = libvl53l1_api.a\r\nLDFLAGS :=\r\nCFLAGS := -Iapi/core -Iapi/platform -std=c99\r\n\r\nSRC_FILES := $(wildcard $(SRC)/*/*.c)\r\nSRC_FILES := $(wildcard $(SRC)/*/*.c)\r\nOBJ_FILES := $(patsubst $(SRC)/*/*.c,$(SRC)/*/%.o,$(SRC_FILES))\r\n\r\n$(LIB): $(OBJ_FILES)\r\n\t$(CC) $(LDFLAGS) $(CFLAGS) -fPIC -shared -o $@ $^\r\n\r\n$(SRC)/%.o: $(SRC)/%.c\r\n\t$(CC) $(LDFLAGS) $(CFLAGS) -c -o $@ $<\r\n\r\ntest: test.c\r\n\t$(CC) $(CFLAGS) $(LDFLAGS) -Lvl53l1_api -o test test.c\r\n```"}}
{"actor":{"display_login":"Gadgetoid"}}