View Issue Details

IDProjectCategoryView StatusLast Update
0003771ardourbugspublic2020-04-19 20:15
Reporteroget Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.8.11 
Target Version2.8.12 
Summary0003771: [PATCH] Compilation fixes against gcc-4.6
DescriptionHi,
During our mass rebuild process to update Fedora to use gcc-4.6, ardour failed to build from source.

There are 3 issues that need attention:

- libs/rubberband/rubberband/RubberBandStretcher.h
needs an #include <cstddef> to have size_t properly defined.

- libs/ardour/enums.cc
needs a namespace fix, otherwise we get an error during the linking phase:
libs/ardour/libardour.so: undefined reference to `ARDOUR::setup_enum_writer()'

- libs/surfaces/wiimote/wiimote.cc
needs a fix in initialization of a struct. class temporaries are no longer allowed in gcc-4.6. The error we got is
libs/surfaces/wiimote/wiimote.cc:180:45: error: taking address of temporary [-fpermissive]
Here are some upstream references for this last change
       http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164704
       http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02144.html

The attached patch resolves all these issues.
TagsNo tags attached.

Activities

2011-02-13 16:38

 

ardour-gcc46.patch (1,568 bytes)   
diff -rupN ardour-2.8.11.old/libs/ardour/enums.cc ardour-2.8.11/libs/ardour/enums.cc
--- ardour-2.8.11.old/libs/ardour/enums.cc	2010-04-20 13:28:37.000000000 -0400
+++ ardour-2.8.11/libs/ardour/enums.cc	2011-02-13 11:23:02.000000000 -0500
@@ -31,7 +31,8 @@
 
 using namespace std;
 using namespace PBD;
-using namespace ARDOUR;
+namespace ARDOUR
+{
 
 void
 setup_enum_writer ()
@@ -362,3 +363,5 @@ setup_enum_writer ()
 	REGISTER (_Track_FreezeState);
 	
 }
+
+}
diff -rupN ardour-2.8.11.old/libs/rubberband/rubberband/RubberBandStretcher.h ardour-2.8.11/libs/rubberband/rubberband/RubberBandStretcher.h
--- ardour-2.8.11.old/libs/rubberband/rubberband/RubberBandStretcher.h	2009-03-26 10:25:40.000000000 -0400
+++ ardour-2.8.11/libs/rubberband/rubberband/RubberBandStretcher.h	2011-02-09 21:41:04.000000000 -0500
@@ -19,6 +19,7 @@
 #define RUBBERBAND_API_MAJOR_VERSION 2
 #define RUBBERBAND_API_MINOR_VERSION 0
 
+#include <cstddef>
 #include <vector>
 
 /**
diff -rupN ardour-2.8.11.old/libs/surfaces/wiimote/wiimote.cc ardour-2.8.11/libs/surfaces/wiimote/wiimote.cc
--- ardour-2.8.11.old/libs/surfaces/wiimote/wiimote.cc	2009-02-24 07:38:19.000000000 -0500
+++ ardour-2.8.11/libs/surfaces/wiimote/wiimote.cc	2011-02-13 11:23:24.000000000 -0500
@@ -177,7 +177,7 @@ wiimote_discovery:
 	std::cerr << "Wiimote: discovering, press 1+2" << std::endl;
 
  	while (!wiimote_handle && !main_thread_quit) {
-		bdaddr = *BDADDR_ANY;
+		bdaddr = (bdaddr_t) {{0, 0, 0, 0, 0, 0}};
 		callback_thread_registered_for_ardour = false;
 		wiimote_handle = cwiid_open(&bdaddr, 0);
 
ardour-gcc46.patch (1,568 bytes)   

cth103

2011-02-13 18:47

administrator   ~0010083

Thanks. Applied to 3.0 SVN 8835.

bigstumpi

2011-05-13 16:33

reporter   ~0010737

Please apply this patches to 2.0-ongoing. I tested it and it compiles with gcc 4.6 and seems to work.
I additionally added the line #include <cstddef> to libs/sigc++2/sigc++/signal_base.h

paul

2011-05-13 16:47

administrator   ~0010738

applied to 2.0-ongoing.

2011-05-14 12:04

 

signal_base.patch (355 bytes)   
--- 2.0-ongoing/libs/sigc++2/sigc++/signal_base.h.orig	2011-05-14 13:58:23.365742291 +0200
+++ 2.0-ongoing/libs/sigc++2/sigc++/signal_base.h	2011-05-14 13:58:40.849074889 +0200
@@ -22,6 +22,7 @@
 #define _SIGC_SIGNAL_BASE_H_
 
 #include <list>
+#include <cstddef>
 #include <sigc++config.h>
 #include <sigc++/type_traits.h>
 #include <sigc++/trackable.h>
signal_base.patch (355 bytes)   

bigstumpi

2011-05-14 12:05

reporter   ~0010742

Added an additional patch for signal_base.h

colinf

2011-05-16 15:49

updater   ~0010750

The change to libs/ardour/enums.cc in the patch as applied to r9505 broke the build of A2 for me on Ubuntu 10.04. scons says:

libs/ardour/libardour.so: undefined reference to `setup_enum_writer()'
collect2: ld returned 1 exit status
scons: *** [gtk2_ardour/ardour-2.8.11] Error 1
scons: building terminated because of errors.

gcc --version says:

gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Reverting just the changes to libs/ardour/enums.cc gets 2.0-ongoing building again for me. I don't know whether this breaks compilation with gcc 4.6, but the corresponding commit in A3 (r8835) doesn't have the change to libs/ardour/enums.cc, so I'm guessing the changes are probably not required.

Musaeus

2011-05-17 01:46

reporter   ~0010764

I ran into the same problem, also on Ubuntu 10.04. I changed libs/ardour/enums.cc back to the version in r8152 (!), the build completed without the error.

bigstumpi

2011-05-17 07:30

reporter   ~0010766

Ummh...

If I revert the change to before r9505 in libs/ardour/enums.cc and try to compile with gcc-4.6 I see the same error:
libs/ardour/libardour.so: undefined reference to `ARDOUR::setup_enum_writer()'

So we could have a problem here...

system

2020-04-19 20:15

developer   ~0022401

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2011-02-13 16:38 oget New Issue
2011-02-13 16:38 oget File Added: ardour-gcc46.patch
2011-02-13 18:47 cth103 Note Added: 0010083
2011-02-13 18:47 cth103 cost => 0.00
2011-02-13 18:47 cth103 Target Version => 2.8.12
2011-02-13 18:48 cth103 Summary compilation fixes against gcc-4.6 => [PATCH] Compilation fixes against gcc-4.6
2011-02-13 18:48 cth103 Status new => acknowledged
2011-02-14 03:39 paul Status acknowledged => resolved
2011-02-14 03:39 paul Resolution open => fixed
2011-02-14 03:39 paul Assigned To => paul
2011-05-13 16:33 bigstumpi Note Added: 0010737
2011-05-13 16:47 paul Note Added: 0010738
2011-05-14 12:04 bigstumpi File Added: signal_base.patch
2011-05-14 12:05 bigstumpi Note Added: 0010742
2011-05-16 15:49 colinf Note Added: 0010750
2011-05-17 01:46 Musaeus Note Added: 0010764
2011-05-17 07:30 bigstumpi Note Added: 0010766
2020-04-19 20:15 system Note Added: 0022401
2020-04-19 20:15 system Status resolved => closed