superctr / mmlgui

GUI for ctrmml
GNU General Public License v2.0
57 stars 9 forks source link

Installation failure: Unknown pkg-config option "--with-path=XXX" and undeclared glfw functions during mmlgui make #6

Open Onisatomimi-No-Miko opened 3 years ago

Onisatomimi-No-Miko commented 3 years ago

I'm running on VM running the latest version of Debian running in VMWare Workstation Pro.

I'd had to install libvgm manually.

Via apt I'd had to install libglfw3(-dev), g++, cmake, zlib and pkg-config.

When I try to install mmlgui via make I've gotten the following error for every g++ file running pkg-config:

Unknown option --with-path=/usr/local/lib/pkgconfig

Even with the following variable set: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

I'd end up getting glfw-related function errors later in the make process:

g++ -Wall -g -DDEBUG -Ictrmml/src -Iimgui -Iimgui/examples -Iimgui/examples/libs/gl3w -DIMGUI_IMPL_OPENGL_LOADER_GL3W -IImGuiColorTextEditpkg-config --cflags glfw3`pkg-config --with-path=/usr/local/lib/pkgconfig --cflags vgm-audio -MMD -c src/main.cpp -o obj/main.o Unknown option --with-path=/usr/local/lib/pkgconfig src/main.cpp: In function ‘int main(int, char*)’: src/main.cpp:112:17: error: ‘GLFW_SCALE_TO_MONITOR’ was not declared in this scope glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); ^~~~~ src/main.cpp:112:17: note: suggested alternative: ‘GLFW_AUTO_ICONIFY’ glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE); ^~~~~ GLFW_AUTO_ICONIFY src/main.cpp:184:2: error: ‘glfwGetWindowContentScale’ was not declared in this scope glfwGetWindowContentScale(window, &scale, NULL); ^~~~~~~~~ src/main.cpp:184:2: note: suggested alternative: ‘glfwGetWindowMonitor’ glfwGetWindowContentScale(window, &scale, NULL); ^~~~~~~~~ glfwGetWindowMonitor src/main.cpp:187:2: error: ‘glfwSetWindowContentScaleCallback’ was not declared in this scope glfwSetWindowContentScaleCallback(window, [](GLFWwindow window, float xscale, float yscale) { ^~~~~~~~~ src/main.cpp:187:2: note: suggested alternative: ‘glfwSetWindowFocusCallback’ glfwSetWindowContentScaleCallback(window, [](GLFWwindow* window, float xscale, float yscale) { ^~~~~~~~~ glfwSetWindowFocusCallback make: *** [Makefile:32: obj/main.o] Error 1 `

The whole output of make on the cloned mmlgui repo is here: https://pastebin.com/CCCYvVWR

Use the following password below to access the paste: tcyxE2spwj

superctr commented 3 years ago

It appears like freedesktop pkg-config doesn't support that command line option. I use this version, which does not have that issue. I'm not sure what the best fix would be, as normally (at least from my experience), libvgm installs itself in usr/local, an unusual place, making that option necessary.

The GLFW error I suspect is due to the library being outdated. Please try the latest version

mmontag commented 3 years ago

I also had to delete the --with-path options to get mmlgui to build on macOS.