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

Can't compile RPI #34

Closed
AbrahamWisman opened this issue Jul 24, 2019 · 8 comments
Closed

Can't compile RPI #34

AbrahamWisman opened this issue Jul 24, 2019 · 8 comments

Comments

@AbrahamWisman
Copy link

AbrahamWisman commented Jul 24, 2019

Probably due to my ignorance but i can't get it to compile on my RPI 3. Im new to RPI and tried to follow this https://www.youtube.com/watch?v=IZgYViHcXdM.
I personally have the feeling that i'm missing some library, i installed GLFW3 and NFDL.

When trying to compile with " make midiviz" i get a lot of compiler errors. Is is even compatible?

CODE:

`

  1. pi@raspberrypi:~/Downloads/MIDIVisualizer-master/MIDIVisualizer-master $ make midiviz
  2. Linking midiviz...
  3. g++: error: OpenGL: No such file or directory
  4. g++: error: Cocoa: No such file or directory
  5. g++: error: IOKit: No such file or directory
  6. g++: error: CoreVideo: No such file or directory
  7. g++: error: AppKit: No such file or directory
  8. g++: error: unrecognized command line option ‘-framework’
  9. g++: error: unrecognized command line option ‘-framework’
  10. g++: error: unrecognized command line option ‘-framework’
  11. g++: error: unrecognized command line option ‘-framework’
  12. g++: error: unrecognized command line option ‘-framework’
  13. make: *** [Makefile:45: midiviz] Error 1

`

@kosua20
Copy link
Owner

kosua20 commented Jul 24, 2019

Hello,
there are two makefiles for the compilation of MIDIVisualizer. The 'default' one is for macOS, and the other one (Makefile.linux) should work on most Linux distributions and others.

You thus have to run makefile -f Makefile.linux, which will look in the proper header/library directories for glfw and nfd. I have never tried to compile it on a Raspberry Pi though, so let me know how it goes!

@AbrahamWisman
Copy link
Author

Hi, Thanks a lot!
make -f Makefile.linux showed me that i missed lnfd, and i'm trying to install in correctly. But got some issues with that.
mlabbe/nativefiledialog#74

@kosua20
Copy link
Owner

kosua20 commented Jul 24, 2019

Make sur that after the nfd compilation, either:

  • nfd is installed in /usr/local/lib/ (for the .a) and /usr/local/include/ (for the .h)
  • or in the MIDIVisualizer makefile, update LIBDIR and INCLUDEDIR to also point to the directories containing the ndf library .a and .h respectively.

From what I can see in the nfd makefiles, the result of the compilation is put in ndf_directory/lib/Release/... or something similar depending on the build options.

@AbrahamWisman
Copy link
Author

Hmm, i downloaded the github files from nfd and tried to install in by going to
Downloads/nativefiledialog-master/nativefiledialog-master/build/gmake_linux
i ran make config=release_x86 but after that the files are not in /usr/local/lib/ and /include/ like you said.

in nfd_directory/build/lib/Release/x86/ is only a libnfd.a file, do i need to copy that?

@kosua20
Copy link
Owner

kosua20 commented Jul 24, 2019

So, with those additional details, you will indeed have to copy files around to 'install' nfd:

  • copy the libnfd.a file to /usr/local/lib/
  • copy nfd_directory/src/include/nfd.h to /usr/local/include/

Then the MIDIVisualizer makefile should work ; let me know if this works !

@AbrahamWisman
Copy link
Author

So i copied both files into the right dir. The compiler isn't missing nfd anymore

  1. $ make -f Makefile.linux
  2. Linking midiviz-packager...
  3. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `SetDefaultPath.part.0':
  4. nfd_gtk.c:(.text+0xc): undefined reference to `gtk_file_chooser_get_type'
  5. /usr/bin/ld: nfd_gtk.c:(.text+0x18): undefined reference to `g_type_check_instance_cast'
  6. /usr/bin/ld: nfd_gtk.c:(.text+0x24): undefined reference to `gtk_file_chooser_set_current_folder'
  7. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `AddFiltersToDialog':
  8. nfd_gtk.c:(.text+0x74): undefined reference to `gtk_file_filter_new'
  9. /usr/bin/ld: nfd_gtk.c:(.text+0x8c): undefined reference to `gtk_file_chooser_get_type'
  10. /usr/bin/ld: nfd_gtk.c:(.text+0xb0): undefined reference to `gtk_file_filter_set_name'
  11. /usr/bin/ld: nfd_gtk.c:(.text+0xbc): undefined reference to `g_type_check_instance_cast'
  12. /usr/bin/ld: nfd_gtk.c:(.text+0xc4): undefined reference to `gtk_file_chooser_add_filter'
  13. /usr/bin/ld: nfd_gtk.c:(.text+0xd8): undefined reference to `gtk_file_filter_new'
  14. /usr/bin/ld: nfd_gtk.c:(.text+0x168): undefined reference to `gtk_file_filter_add_pattern'
  15. /usr/bin/ld: nfd_gtk.c:(.text+0x184): undefined reference to `gtk_file_filter_new'
  16. /usr/bin/ld: nfd_gtk.c:(.text+0x190): undefined reference to `gtk_file_filter_set_name'
  17. /usr/bin/ld: nfd_gtk.c:(.text+0x19c): undefined reference to `gtk_file_filter_add_pattern'
  18. /usr/bin/ld: nfd_gtk.c:(.text+0x1a8): undefined reference to `g_type_check_instance_cast'
  19. /usr/bin/ld: nfd_gtk.c:(.text+0x1b0): undefined reference to `gtk_file_chooser_add_filter'
  20. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `NFD_OpenDialog':
  21. nfd_gtk.c:(.text+0x1e8): undefined reference to `gtk_init_check'
  22. /usr/bin/ld: nfd_gtk.c:(.text+0x220): undefined reference to `gtk_file_chooser_dialog_new'
  23. /usr/bin/ld: nfd_gtk.c:(.text+0x244): undefined reference to `gtk_dialog_get_type'
  24. /usr/bin/ld: nfd_gtk.c:(.text+0x250): undefined reference to `g_type_check_instance_cast'
  25. /usr/bin/ld: nfd_gtk.c:(.text+0x254): undefined reference to `gtk_dialog_run'
  26. /usr/bin/ld: nfd_gtk.c:(.text+0x268): undefined reference to `gtk_main_iteration'
  27. /usr/bin/ld: nfd_gtk.c:(.text+0x26c): undefined reference to `gtk_events_pending'
  28. /usr/bin/ld: nfd_gtk.c:(.text+0x27c): undefined reference to `gtk_widget_destroy'
  29. /usr/bin/ld: nfd_gtk.c:(.text+0x284): undefined reference to `gtk_main_iteration'
  30. /usr/bin/ld: nfd_gtk.c:(.text+0x288): undefined reference to `gtk_events_pending'
  31. /usr/bin/ld: nfd_gtk.c:(.text+0x2c4): undefined reference to `gtk_file_chooser_get_type'
  32. /usr/bin/ld: nfd_gtk.c:(.text+0x2d0): undefined reference to `g_type_check_instance_cast'
  33. /usr/bin/ld: nfd_gtk.c:(.text+0x2d4): undefined reference to `gtk_file_chooser_get_filename'
  34. /usr/bin/ld: nfd_gtk.c:(.text+0x30c): undefined reference to `g_free'
  35. /usr/bin/ld: nfd_gtk.c:(.text+0x318): undefined reference to `g_free'
  36. /usr/bin/ld: nfd_gtk.c:(.text+0x320): undefined reference to `gtk_widget_destroy'
  37. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `NFD_OpenDialogMultiple':
  38. nfd_gtk.c:(.text+0x354): undefined reference to `gtk_init_check'
  39. /usr/bin/ld: nfd_gtk.c:(.text+0x38c): undefined reference to `gtk_file_chooser_dialog_new'
  40. /usr/bin/ld: nfd_gtk.c:(.text+0x394): undefined reference to `gtk_file_chooser_get_type'
  41. /usr/bin/ld: nfd_gtk.c:(.text+0x3a4): undefined reference to `g_type_check_instance_cast'
  42. /usr/bin/ld: nfd_gtk.c:(.text+0x3ac): undefined reference to `gtk_file_chooser_set_select_multiple'
  43. /usr/bin/ld: nfd_gtk.c:(.text+0x3d0): undefined reference to `gtk_dialog_get_type'
  44. /usr/bin/ld: nfd_gtk.c:(.text+0x3dc): undefined reference to `g_type_check_instance_cast'
  45. /usr/bin/ld: nfd_gtk.c:(.text+0x3e0): undefined reference to `gtk_dialog_run'
  46. /usr/bin/ld: nfd_gtk.c:(.text+0x3f4): undefined reference to `gtk_main_iteration'
  47. /usr/bin/ld: nfd_gtk.c:(.text+0x3f8): undefined reference to `gtk_events_pending'
  48. /usr/bin/ld: nfd_gtk.c:(.text+0x408): undefined reference to `gtk_widget_destroy'
  49. /usr/bin/ld: nfd_gtk.c:(.text+0x410): undefined reference to `gtk_main_iteration'
  50. /usr/bin/ld: nfd_gtk.c:(.text+0x414): undefined reference to `gtk_events_pending'
  51. /usr/bin/ld: nfd_gtk.c:(.text+0x458): undefined reference to `g_type_check_instance_cast'
  52. /usr/bin/ld: nfd_gtk.c:(.text+0x45c): undefined reference to `gtk_file_chooser_get_filenames'
  53. /usr/bin/ld: nfd_gtk.c:(.text+0x464): undefined reference to `g_slist_length'
  54. /usr/bin/ld: nfd_gtk.c:(.text+0x4ec): undefined reference to `g_free'
  55. /usr/bin/ld: nfd_gtk.c:(.text+0x518): undefined reference to `g_slist_free'
  56. /usr/bin/ld: nfd_gtk.c:(.text+0x528): undefined reference to `gtk_widget_destroy'
  57. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `NFD_SaveDialog':
  58. nfd_gtk.c:(.text+0x56c): undefined reference to `gtk_init_check'
  59. /usr/bin/ld: nfd_gtk.c:(.text+0x5a4): undefined reference to `gtk_file_chooser_dialog_new'
  60. /usr/bin/ld: nfd_gtk.c:(.text+0x5ac): undefined reference to `gtk_file_chooser_get_type'
  61. /usr/bin/ld: nfd_gtk.c:(.text+0x5bc): undefined reference to `g_type_check_instance_cast'
  62. /usr/bin/ld: nfd_gtk.c:(.text+0x5c4): undefined reference to `gtk_file_chooser_set_do_overwrite_confirmation'
  63. /usr/bin/ld: nfd_gtk.c:(.text+0x5e8): undefined reference to `gtk_dialog_get_type'
  64. /usr/bin/ld: nfd_gtk.c:(.text+0x5f4): undefined reference to `g_type_check_instance_cast'
  65. /usr/bin/ld: nfd_gtk.c:(.text+0x5f8): undefined reference to `gtk_dialog_run'
  66. /usr/bin/ld: nfd_gtk.c:(.text+0x60c): undefined reference to `gtk_main_iteration'
  67. /usr/bin/ld: nfd_gtk.c:(.text+0x610): undefined reference to `gtk_events_pending'
  68. /usr/bin/ld: nfd_gtk.c:(.text+0x620): undefined reference to `gtk_widget_destroy'
  69. /usr/bin/ld: nfd_gtk.c:(.text+0x628): undefined reference to `gtk_main_iteration'
  70. /usr/bin/ld: nfd_gtk.c:(.text+0x62c): undefined reference to `gtk_events_pending'
  71. /usr/bin/ld: nfd_gtk.c:(.text+0x670): undefined reference to `g_type_check_instance_cast'
  72. /usr/bin/ld: nfd_gtk.c:(.text+0x674): undefined reference to `gtk_file_chooser_get_filename'
  73. /usr/bin/ld: nfd_gtk.c:(.text+0x6ac): undefined reference to `g_free'
  74. /usr/bin/ld: nfd_gtk.c:(.text+0x6b8): undefined reference to `g_free'
  75. /usr/bin/ld: nfd_gtk.c:(.text+0x6c0): undefined reference to `gtk_widget_destroy'
  76. /usr/bin/ld: //usr/local/lib/libnfd.a(nfd_gtk.o): in function `NFD_PickFolder':
  77. nfd_gtk.c:(.text+0x6f0): undefined reference to `gtk_init_check'
  78. /usr/bin/ld: nfd_gtk.c:(.text+0x728): undefined reference to `gtk_file_chooser_dialog_new'
  79. /usr/bin/ld: nfd_gtk.c:(.text+0x730): undefined reference to `gtk_file_chooser_get_type'
  80. /usr/bin/ld: nfd_gtk.c:(.text+0x740): undefined reference to `g_type_check_instance_cast'
  81. /usr/bin/ld: nfd_gtk.c:(.text+0x748): undefined reference to `gtk_file_chooser_set_do_overwrite_confirmation'
  82. /usr/bin/ld: nfd_gtk.c:(.text+0x760): undefined reference to `gtk_dialog_get_type'
  83. /usr/bin/ld: nfd_gtk.c:(.text+0x76c): undefined reference to `g_type_check_instance_cast'
  84. /usr/bin/ld: nfd_gtk.c:(.text+0x770): undefined reference to `gtk_dialog_run'
  85. /usr/bin/ld: nfd_gtk.c:(.text+0x784): undefined reference to `gtk_main_iteration'
  86. /usr/bin/ld: nfd_gtk.c:(.text+0x788): undefined reference to `gtk_events_pending'
  87. /usr/bin/ld: nfd_gtk.c:(.text+0x798): undefined reference to `gtk_widget_destroy'
  88. /usr/bin/ld: nfd_gtk.c:(.text+0x7a0): undefined reference to `gtk_main_iteration'
  89. /usr/bin/ld: nfd_gtk.c:(.text+0x7a4): undefined reference to `gtk_events_pending'
  90. /usr/bin/ld: nfd_gtk.c:(.text+0x7e8): undefined reference to `g_type_check_instance_cast'
  91. /usr/bin/ld: nfd_gtk.c:(.text+0x7ec): undefined reference to `gtk_file_chooser_get_filename'
  92. /usr/bin/ld: nfd_gtk.c:(.text+0x824): undefined reference to `g_free'
  93. /usr/bin/ld: nfd_gtk.c:(.text+0x830): undefined reference to `g_free'
  94. /usr/bin/ld: nfd_gtk.c:(.text+0x838): undefined reference to `gtk_widget_destroy'
  95. collect2: error: ld returned 1 exit status
  96. make: *** [Makefile.linux:51: midiviz-packager] Error 1

The error looks like im missing GTK+, but i think that i have it installed imo.

1. $ sudo apt-get install libgtk-3-dev
2. Reading package lists... Done
3. Building dependency tree
4. Reading state information... Done
5. libgtk-3-dev is already the newest version (3.24.5-1+rpt2).

@kosua20
Copy link
Owner

kosua20 commented Jul 25, 2019

I recall somebody had a similar issue on Linux (see #1 ), I've updated the Makefile.linux file with the proper commands.

@AbrahamWisman
Copy link
Author

Thank you so much for updating the makefile
It runs at about 1 fps currently.

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