PoroCYon/smol

make python error

Closed this issue · 2 comments

make all fails on ubuntu 18.04

cc -flto -Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC -Os -fno-plt -fno-stack-protector -fno-stack-check -fno-unwind-tables -fno-asynchronous-unwind-tables -fomit-frame-pointer -ffast-math -no-pie -fno-pic -fno-PIE -m64 -march=core2 -ffunction-sections -fdata-sections -fno-plt -m64 -D_REENTRANT -I/usr/include/SDL2 -c "test/hello.c" -o "obj/hello.lto.o"
cc -flto -Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC -Os -fno-plt -fno-stack-protector -fno-stack-check -fno-unwind-tables -fno-asynchronous-unwind-tables -fomit-frame-pointer -ffast-math -no-pie -fno-pic -fno-PIE -m64 -march=core2 -ffunction-sections -fdata-sections -fno-plt -m64 -D_REENTRANT -I/usr/include/SDL2 -c "rt/crt1.c" -o "obj/crt1.lto.o"
rt/crt1.c:22:1: warning: 'naked' attribute directive ignored [-Wattributes]
) {
^
cc -m64 -nostartfiles -nostdlib -r -o "obj/hello.start.o" obj/hello.lto.o obj/crt1.lto.o
python3 src/smol.py -lc -lSDL2 -lX11 "obj/hello.start.o" "obj/symbols.hello.start.asm"
Traceback (most recent call last):
File "src/smol.py", line 77, in
main()
File "src/smol.py", line 67, in main
library = find_symbol(args.scanelf, libs, libnames, symbol)
File "/home/martin/work/demos/Clutter-1k/smol/src/smolparse.py", line 127, in find_symbol
'+{}'.format(symbol)] + libraries, stderr=subprocess.DEVNULL)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1278, in _execute_child
executable = os.fsencode(executable)
File "/usr/lib/python3.6/os.py", line 800, in fsencode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
Makefile:83: recipe for target 'obj/symbols.hello.start.asm' failed
make: *** [obj/symbols.hello.start.asm] Error 1

You need scanelf from pax-utils.

Should probably emit a proper error for that, though.

... I thought this would be closed automatically. oh well.