Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing path or include #1

Closed
bittorf opened this issue May 6, 2019 · 3 comments
Closed

missing path or include #1

bittorf opened this issue May 6, 2019 · 3 comments
Assignees

Comments

@bittorf
Copy link

bittorf commented May 6, 2019

this looks...strange:

bastian@X301-II:~/software/Tetris2k$ git grep Bibliotheken
src/smol.py:    spaths = args.libdir + paths['Bibliotheken']
src/smol.py:    libraries=paths['Bibliotheken']

see this problem:

bastian@X301-II:~/software/Tetris2k$ LC_ALL=C make
mkdir: created directory 'obj/'
cc -flto -Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC -Os -fno-plt -fwhole-program -fno-stack-protector -fno-stack-check -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions  -funsafe-math-optimizations -fomit-frame-pointer -ffast-math -no-pie -fno-pic -march=i386 -mtune=i386 -ffunction-sections -fdata-sections -fno-plt   -m32 -D_REENTRANT -I/usr/include/SDL2 -c "test/tetris.c" -o "obj/tetris.lto.o"
test/tetris.c: In function 'audio_callback':
test/tetris.c:78:27: warning: unused parameter 'unused' [-Wunused-parameter]
 void audio_callback(void *unused, uint8_t *byte_stream, int byte_stream_length)
                           ^~~~~~
test/tetris.c: At top level:
test/tetris.c:303:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^~~~
cc -flto -Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC -Os -fno-plt -fwhole-program -fno-stack-protector -fno-stack-check -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions  -funsafe-math-optimizations -fomit-frame-pointer -ffast-math -no-pie -fno-pic -march=i386 -mtune=i386 -ffunction-sections -fdata-sections -fno-plt   -m32 -D_REENTRANT -I/usr/include/SDL2 -c "rt/crt1.c" -o "obj/crt1.lto.o"
rt/crt1.c:22:1: warning: '__externally_visible__' attribute have effect only on public objects [-Wattributes]
 ) {
 ^
rt/crt1.c: In function '_start':
rt/crt1.c:38:23: warning: passing argument 1 of '__libc_start_main' from incompatible pointer type [-Wincompatible-pointer-types]
     __libc_start_main(main, NULL, NULL, NULL, NULL,
                       ^~~~
rt/crt1.c:6:12: note: expected 'int (*)(int,  char **)' but argument is of type 'void (*)()'
 extern int __libc_start_main(int (*main)(int, char**),
            ^~~~~~~~~~~~~~~~~
rt/crt1.c:38:29: warning: passing argument 2 of '__libc_start_main' makes integer from pointer without a cast [-Wint-conversion]
     __libc_start_main(main, NULL, NULL, NULL, NULL,
                             ^~~~
rt/crt1.c:6:12: note: expected 'int' but argument is of type 'void *'
 extern int __libc_start_main(int (*main)(int, char**),
            ^~~~~~~~~~~~~~~~~
rt/crt1.c:18:25: warning: unused parameter 'stack' [-Wunused-parameter]
 static int _start(void* stack
                         ^~~~~
cc -m32 -Wl,--build-id=none -Wl,--hash-style=gnu -Wl,-z,norelro -nostartfiles -nostdlib  -r -o "obj/tetris.start.o" obj/tetris.lto.o obj/crt1.lto.o
python3 src/smol.py -s -lc -lSDL2 "obj/tetris.start.o" "obj/symbols.tetris.start.asm"
Traceback (most recent call last):
  File "src/smol.py", line 78, in <module>
    main()
  File "src/smol.py", line 61, in main
    spaths = args.libdir + paths['Bibliotheken']
KeyError: 'Bibliotheken'
Makefile:78: recipe for target 'obj/symbols.tetris.start.asm' failed
make: *** [obj/symbols.tetris.start.asm] Error 1

@donnerbrenn
Copy link
Owner

donnerbrenn commented May 6, 2019

Yes. You're right. I completely forget about this. In the original smol project it says
spaths = args.libdir + paths['libraries']

and

libraries=paths['libraries']

I'm on a german-localized arch-system. The key 'libraries" doesn't exist there. (So i got the key error, your system hicks up, but just the other wa around...). I printed out the existing keys of the dict on my system in the smol.py and found "Bibliotheken", that's just the german word for libraries, so i changed the script for my demands and forgot to create in issue on the smol project, so they can maybe provide a fix. On Ubuntu it's always 'libraries', even, it's a german localized system....

@donnerbrenn donnerbrenn added the help wanted Extra attention is needed label May 6, 2019
@donnerbrenn
Copy link
Owner

donnerbrenn commented May 6, 2019

I reverted the script to 'libraries' now. If anyone has an idea, how to fix more conevenient, than just change the script... Help would be appreciated.

@donnerbrenn donnerbrenn self-assigned this May 6, 2019
@donnerbrenn
Copy link
Owner

Could be fixed with the help of PoroCYon from the original smol project.

@donnerbrenn donnerbrenn removed the help wanted Extra attention is needed label May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants