View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000973 | ardour | other | public | 2005-04-26 06:50 | 2005-06-09 19:26 |
| Reporter | nmains | Assigned To | taybin | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0000973: gcc 4 compilation | ||||
| Description | ardour (and even bits of gtkmm) won't compile on gcc version 4. here is a *probably incorrect* patch that should allow a clean compilation. please correct it and repost if you see a problem. | ||||
| Tags | No tags attached. | ||||
|
2005-04-26 06:50
|
gcc4.patch (8,296 bytes)
diff -ur --exclude=po ardour/gtk_ardour/connection_editor.cc ardour_gcc_4/gtk_ardour/connection_editor.cc
--- ardour/gtk_ardour/connection_editor.cc 2005-01-20 16:05:57.000000000 +1100
+++ ardour_gcc_4/gtk_ardour/connection_editor.cc 2005-04-10 20:24:52.000000000 +1000
@@ -438,7 +438,7 @@
for (i = portmap.begin(); i != portmap.end(); ++i) {
Box *client_box = manage (new VBox);
- CList *client_port_display = manage (new CList (1));
+ Gtk::CList *client_port_display = manage (new Gtk::CList (1));
ScrolledWindow *scroller = manage (new ScrolledWindow);
scroller->add_with_viewport (*client_port_display);
diff -ur --exclude=po ardour/gtk_ardour/crossfade_edit.cc ardour_gcc_4/gtk_ardour/crossfade_edit.cc
--- ardour/gtk_ardour/crossfade_edit.cc 2005-04-16 03:24:44.000000000 +1000
+++ ardour_gcc_4/gtk_ardour/crossfade_edit.cc 2005-04-16 05:37:33.000000000 +1000
@@ -1151,7 +1151,7 @@
AudioPlaylist& pl (session.the_auditioner().prepare_playlist());
jack_nframes_t preroll;
jack_nframes_t postroll;
- jack_nframes_t length;
+ jack_nframes_t length = 0;
jack_nframes_t left_start_offset;
jack_nframes_t right_length;
jack_nframes_t left_length;
diff -ur --exclude=po ardour/gtk_ardour/editor.cc ardour_gcc_4/gtk_ardour/editor.cc
--- ardour/gtk_ardour/editor.cc 2005-04-20 03:12:36.000000000 +1000
+++ ardour_gcc_4/gtk_ardour/editor.cc 2005-04-21 00:09:55.000000000 +1000
@@ -87,6 +87,8 @@
const double max_canvas_coordinate = 100000000.0;
+const double Editor::timebar_height = 15.0;
+
#include "editor_xpms"
static const gchar *route_list_titles[] = {
diff -ur --exclude=po ardour/gtk_ardour/editor.h ardour_gcc_4/gtk_ardour/editor.h
--- ardour/gtk_ardour/editor.h 2005-04-19 05:08:04.000000000 +1000
+++ ardour_gcc_4/gtk_ardour/editor.h 2005-04-21 00:09:56.000000000 +1000
@@ -561,7 +561,7 @@
Gtk::Widget *minsec_ruler;
static Editor *ruler_editor;
- static const double timebar_height = 15.0;
+ static const double timebar_height;
guint32 visible_timebars;
Gtk::Menu *editor_ruler_menu;
diff -ur --exclude=po ardour/gtk_ardour/io_selector.cc ardour_gcc_4/gtk_ardour/io_selector.cc
--- ardour/gtk_ardour/io_selector.cc 2005-04-20 03:12:36.000000000 +1000
+++ ardour_gcc_4/gtk_ardour/io_selector.cc 2005-04-21 00:09:57.000000000 +1000
@@ -330,7 +330,7 @@
for (i = portmap.begin(); i != portmap.end(); ++i) {
Box *client_box = manage (new VBox);
- CList *client_port_display = manage (new CList (1));
+ Gtk::CList *client_port_display = manage (new Gtk::CList (1));
ScrolledWindow *scroller = manage (new ScrolledWindow);
scroller->add_with_viewport (*client_port_display);
diff -ur --exclude=po ardour/gtk_ardour/redirect_box.cc ardour_gcc_4/gtk_ardour/redirect_box.cc
--- ardour/gtk_ardour/redirect_box.cc 2005-04-12 08:22:34.000000000 +1000
+++ ardour_gcc_4/gtk_ardour/redirect_box.cc 2005-04-12 16:36:47.000000000 +1000
@@ -245,7 +245,7 @@
{
gint row=-1, col=-1;
Redirect *redirect;
- CList *clist = &redirect_display;
+ Gtk::CList *clist = &redirect_display;
if (clist->get_selection_info ((int)ev->x, (int)ev->y, &row, &col) != 1) {
redirect = 0;
@@ -409,7 +409,7 @@
using namespace Menu_Helpers;
using namespace CList_Helpers;
- CList* clist = &redirect_display;
+ Gtk::CList* clist = &redirect_display;
bool sensitive = !clist->selection().empty();
diff -ur --exclude=po ardour/libs/ardour/ardour/stateful.h ardour_gcc_4/libs/ardour/ardour/stateful.h
--- ardour/libs/ardour/ardour/stateful.h 2004-11-29 14:04:46.000000000 +1100
+++ ardour_gcc_4/libs/ardour/ardour/stateful.h 2005-04-10 20:21:14.000000000 +1000
@@ -29,6 +29,8 @@
public:
Stateful();
+ virtual ~Stateful() {}
+
virtual XMLNode& get_state (void) = 0;
virtual int set_state (const XMLNode&) = 0;
Only in ardour_gcc_4/libs/ardour/ardour: stateful.h.~1.8.~
diff -ur --exclude=po ardour/libs/ardour/ardour/tempo.h ardour_gcc_4/libs/ardour/ardour/tempo.h
--- ardour/libs/ardour/ardour/tempo.h 2005-03-15 02:12:12.000000000 +1100
+++ ardour_gcc_4/libs/ardour/ardour/tempo.h 2005-04-10 20:46:58.000000000 +1000
@@ -65,7 +65,7 @@
class Meter {
public:
- static const double ticks_per_beat = 1920.0;
+ static const double ticks_per_beat;
Meter (double bpb, double bt)
: _beats_per_bar (bpb), _note_type (bt) {}
diff -ur --exclude=po ardour/libs/ardour/diskstream.cc ardour_gcc_4/libs/ardour/diskstream.cc
--- ardour/libs/ardour/diskstream.cc 2005-04-14 05:13:58.000000000 +1000
+++ ardour_gcc_4/libs/ardour/diskstream.cc 2005-04-15 05:17:25.000000000 +1000
@@ -1238,7 +1238,7 @@
{
uint32_t to_write;
int32_t ret = 0;
- RingBufferNPT<Sample>::rw_vector vector;
+ static RingBufferNPT<Sample>::rw_vector vector;
jack_nframes_t total;
/* important note: this function will write *AT MOST*
diff -ur --exclude=po ardour/libs/ardour/tempo.cc ardour_gcc_4/libs/ardour/tempo.cc
--- ardour/libs/ardour/tempo.cc 2005-03-11 04:03:04.000000000 +1100
+++ ardour_gcc_4/libs/ardour/tempo.cc 2005-04-10 20:44:53.000000000 +1000
@@ -41,6 +41,8 @@
Meter TempoMap::_default_meter (4.0, 4.0);
Tempo TempoMap::_default_tempo (120.0);
+const double Meter::ticks_per_beat = 1920.0;
+
/***********************************************************************/
double
diff -ur --exclude=po ardour/libs/gtkmm/src/gtk--/clist.cc ardour_gcc_4/libs/gtkmm/src/gtk--/clist.cc
--- ardour/libs/gtkmm/src/gtk--/clist.cc 2003-06-18 02:37:40.000000000 +1000
+++ ardour_gcc_4/libs/gtkmm/src/gtk--/clist.cc 2005-04-10 19:50:32.000000000 +1000
@@ -967,7 +967,7 @@
return parent_->gtkobj()->rows;
}
-Freeze::Freeze(CList & clist)
+Freeze::Freeze(Gtk::CList & clist)
: clist_(&clist)
{
clist_->freeze();
Only in ardour_gcc_4/libs/gtkmm/src/gtk--: clist.cc.~1.3.~
diff -ur --exclude=po ardour/libs/gtkmm/src/gtk--/clist.h ardour_gcc_4/libs/gtkmm/src/gtk--/clist.h
--- ardour/libs/gtkmm/src/gtk--/clist.h 2003-06-18 02:37:40.000000000 +1000
+++ ardour_gcc_4/libs/gtkmm/src/gtk--/clist.h 2005-04-10 19:49:22.000000000 +1000
@@ -73,7 +73,7 @@
class Cell
{
protected:
- friend class CList;
+ friend class Gtk::CList;
friend class Row;
GtkCList *parent_;
diff -ur --exclude=po ardour/libs/gtkmm/src/gtk--/radiobutton.h ardour_gcc_4/libs/gtkmm/src/gtk--/radiobutton.h
--- ardour/libs/gtkmm/src/gtk--/radiobutton.h 2003-06-18 02:37:41.000000000 +1000
+++ ardour_gcc_4/libs/gtkmm/src/gtk--/radiobutton.h 2005-04-10 19:55:54.000000000 +1000
@@ -45,7 +45,7 @@
//- It should not be called with new.
class Group
{
- friend class RadioButton;
+ friend class Gtk::RadioButton;
GSList *group_;
void* operator new(size_t);
void add(RadioButton& item);
diff -ur --exclude=po ardour/libs/gtkmm/src/gtk--/radiomenuitem.h ardour_gcc_4/libs/gtkmm/src/gtk--/radiomenuitem.h
--- ardour/libs/gtkmm/src/gtk--/radiomenuitem.h 2003-06-18 02:37:41.000000000 +1000
+++ ardour_gcc_4/libs/gtkmm/src/gtk--/radiomenuitem.h 2005-04-10 20:16:03.000000000 +1000
@@ -46,7 +46,7 @@
//- It should not be called with new.
class Group
{
- friend class RadioMenuItem;
+ friend class Gtk::RadioMenuItem;
GSList *group_;
void* operator new(size_t);
void add(RadioMenuItem& item);
diff -ur --exclude=po ardour/libs/soundtouch/soundtouch/FIFOSamplePipe.h ardour_gcc_4/libs/soundtouch/soundtouch/FIFOSamplePipe.h
--- ardour/libs/soundtouch/soundtouch/FIFOSamplePipe.h 2003-02-28 01:56:24.000000000 +1100
+++ ardour_gcc_4/libs/soundtouch/soundtouch/FIFOSamplePipe.h 2005-04-10 20:58:39.000000000 +1000
@@ -89,6 +89,8 @@
// Clears all the samples in the object
virtual void clear() = 0;
+
+ virtual ~FIFOSamplePipe() {}
};
diff -ur --exclude=po ardour/libs/soundtouch/soundtouch/FIRFilter.h ardour_gcc_4/libs/soundtouch/soundtouch/FIRFilter.h
--- ardour/libs/soundtouch/soundtouch/FIRFilter.h 2003-02-28 01:56:24.000000000 +1100
+++ ardour_gcc_4/libs/soundtouch/soundtouch/FIRFilter.h 2005-04-10 20:58:39.000000000 +1000
@@ -72,6 +72,8 @@
public:
FIRFilter();
+ virtual ~FIRFilter() {}
+
// Applies the filter to the given sequence of samples.
// Note : The amount of outputted samples is by value of 'filter_length'
// smaller than the amount of input samples.
|
|
|
I didn't have any compliation problems with gcc4 on osx 10.4. Not sure how much their gcc differs though. |
|
|
Apple's version of gcc4 was forked quite a while before the official gcc4 code was released. It's reportedly nice, but it has significant patches, especially in reguards to objective C++ and auto-vectorization. The differences are quite significant and they should be considered two totally different, albeit closely related, compilers. |
|
|
Committed |
|
|
compiles fine here, just a matter of this warning now; libs/pbd/pbd/fastlog.h:14: warning: dereferencing type-punned pointer will break strict-aliasing rules i think this has something to do with the meters 'bouncing' under gcc4. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-04-26 06:50 | nmains | New Issue | |
| 2005-04-26 06:50 | nmains | File Added: gcc4.patch | |
| 2005-05-01 01:31 | taybin | Note Added: 0002190 | |
| 2005-05-02 04:01 | FishB8 | Note Added: 0002192 | |
| 2005-06-09 18:05 | taybin | Status | new => resolved |
| 2005-06-09 18:05 | taybin | Fixed in Version | => CVS |
| 2005-06-09 18:05 | taybin | Resolution | open => fixed |
| 2005-06-09 18:05 | taybin | Assigned To | => taybin |
| 2005-06-09 18:05 | taybin | Note Added: 0002257 | |
| 2005-06-09 19:26 | nmains | Status | resolved => closed |
| 2005-06-09 19:26 | nmains | Note Added: 0002258 |