Latest tip fails to build with GCC 4.7

For Linux specific issues

Latest tip fails to build with GCC 4.7

Postby falkTX » Wed Apr 11, 2012 10:54 pm

Hey jules, latest git code fails to build on newer gcc, error:
Code: Select all
==== Building juce-events ====
juce_events.cpp
In file included from ../source/modules/juce_events/juce_events.cpp:98:0:
../source/modules/juce_events/native/juce_linux_Messaging.cpp: In destructor ‘juce::InternalMessageQueue::~InternalMessageQueue()’:
../source/modules/juce_events/native/juce_linux_Messaging.cpp:55:21: error: ‘close’ was not declared in this scope
../source/modules/juce_events/native/juce_linux_Messaging.cpp: In member function ‘void juce::InternalMessageQueue::postMessage(juce::MessageManager::MessageBase*)’:
../source/modules/juce_events/native/juce_linux_Messaging.cpp:75:54: error: ‘write’ was not declared in this scope
../source/modules/juce_events/native/juce_linux_Messaging.cpp: In member function ‘juce::MessageManager::MessageBase::Ptr juce::InternalMessageQueue::popNextMessage()’:
../source/modules/juce_events/native/juce_linux_Messaging.cpp:186:49: error: ‘read’ was not declared in this scope
make[3]: *** [intermediate/Release/juce_events.o] Errore 1
make[2]: *** [juce-events] Errore 2
make[2]: Leaving directory `/home/speps/chroot/buildscripts/distrho/distrho-git/src/distrho-build/libs/juce-2.0/build-events'
make[1]: *** [events] Errore 2
make[1]: Leaving directory `/home/speps/chroot/buildscripts/distrho/distrho-git/src/distrho-build/libs/juce-2.0'
make: *** [standalone] Errore 2


Fix:
Code: Select all
--- a/libs/juce-2.0/source/modules/juce_events/juce_events.cpp
+++ b/libs/juce-2.0/source/modules/juce_events/juce_events.cpp
@@ -52,6 +52,7 @@
  #import <IOKit/pwr_mgt/IOPMLib.h>

#elif JUCE_LINUX
+ #include <unistd.h>
  #include <X11/Xlib.h>
  #include <X11/Xresource.h>
  #include <X11/Xutil.h>
--
falkTX
JUCE UberWeenie
 
Posts: 117
Joined: Sat Jun 04, 2011 4:15 pm

Re: Latest tip fails to build with GCC 4.7

Postby falkTX » Thu Apr 12, 2012 1:20 am

Also fails on gui_basics, fix:
Code: Select all
--- a/libs/juce-2.0/source/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/libs/juce-2.0/source/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -90,6 +90,7 @@

//==============================================================================
#elif JUCE_LINUX
+ #include <unistd.h>
  #include <X11/Xlib.h>
  #include <X11/Xatom.h>
  #include <X11/Xresource.h>
falkTX
JUCE UberWeenie
 
Posts: 117
Joined: Sat Jun 04, 2011 4:15 pm

Re: Latest tip fails to build with GCC 4.7

Postby jules » Thu Apr 12, 2012 9:44 am

Cool, thanks!
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to Linux

Who is online

Users browsing this forum: No registered users and 0 guests