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

X11 Windowing Fails to Compile and or Link #15

Open
mfisher31 opened this issue Mar 7, 2021 · 4 comments
Open

X11 Windowing Fails to Compile and or Link #15

mfisher31 opened this issue Mar 7, 2021 · 4 comments

Comments

@mfisher31
Copy link

Getting undefined reference when building an exported Makefile. Getting compiler errors when using waf. Latest JUCE master does not have these issues.

From Projucer makefile project

build/intermediate/Release/include_juce_gui_basics_e3f79785.o: In function `juce::getPeerFor(unsigned long, bool)':
include_juce_gui_basics.cpp:(.text+0x4a191): undefined reference to `XGetWMHints'
include_juce_gui_basics.cpp:(.text+0x4a1af): undefined reference to `XFree'
collect2: error: ld returned 1 exit status
Makefile:138: recipe for target 'build/Projucer' failed
make: *** [build/Projucer] Error 1

From Element

In file included from ../libs/compat/include_juce_gui_basics.cpp:9:
In file included from ../libs/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:262:
../libs/JUCE/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:631:125: error: type 'std::unique_ptr<XVisualInfo, juce::(anonymous namespace)::XFreeDeleter>' does not provide a subscript operator
                                auto pictVisualFormat = X11Symbols::getInstance()->xRenderFindVisualFormat (display, xvinfos[i].visual);
                                                                                                                     ~~~~~~~^~
../libs/JUCE/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp:637:53: error: type 'std::unique_ptr<XVisualInfo, juce::(anonymous namespace)::XFreeDeleter>' does not provide a subscript operator
                                    visual = xvinfos[i].visual;
                                             ~~~~~~~^~
2 errors generated.

Please include:

  1. detailed steps on how to reproduce the bug, preferably with already
    existing JUCE code such as the demo plugin or the demo code
    Compile Element

  2. the expected behaviour
    No compiler or linker errors

  3. the operating system
    Ubuntu 18.0.04

  4. the architecture (32-bit or 64-bit)
    64bit

  5. a stack trace - if the bug causes a crash
    none

  6. the plugin format (VST2, VST3, AU, AAX, RTAS) - if applicable
    n/a

  7. which DAW you observed the bug in - if applicable
    n/a

Make sure you have pulled the latest commits from the develop branch of the
JUCE repo and have re-compiled the Projucer before you submit your bug. Often
we have already fixed the issue but it hasn't yet been released on the master
branch. If it's a major bug, which must be hot-fixed immediately, then we will
also accept bug reports for tagged release versions.

@falkTX
Copy link

falkTX commented Mar 8, 2021

Can you try with c38ea34 ?
(slightly older commit before changes for vital synth and merging develop juce stuff)

@mfisher31
Copy link
Author

Sorry it took so long. Projucer compiles fine, still getting the error building Element.

@falkTX
Copy link

falkTX commented Mar 16, 2021

I fixed this up on latest git again. No longer have hacky workarounds, the x11 code is all from juce.

I have not modified x11 part of the code that much, and obviously the juce stuff still builds as I just made a release with it.

@mfisher31
Copy link
Author

Excellent! Thanks.

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