tags 456104 + patch
stop
I went through the cheesetracker source: There was a name clash between
std::vector and a variable vector. Also lots of string.h and stdlib
includes were missing.
The attached patch fixes the problem / cheesetracker compiles and starts
up.
Another thing, scons completely ignored my
export CC=gcc-4.3
export CXX=g++-4.3
So shouldn't
env['CXX'] = os.environ['CXX']
env['CC'] = os.environ['CC']
be added to SConstruct?
Soeren
diff -N -ur cheesetracker-0.9.15.2/debian/patches/debian-gcc4.3.patch cheesetracker-0.9.15.2-patched/debian/patches/debian-gcc4.3.patch
--- cheesetracker-0.9.15.2/debian/patches/debian-gcc4.3.patch 1970-01-01 01:00:00.000000000 +0100
+++ cheesetracker-0.9.15.2-patched/debian/patches/debian-gcc4.3.patch 2008-04-08 08:24:59.000000000 +0200
@@ -0,0 +1,303 @@
+diff -ur cheesetracker-0.9.15.2/cheesetracker/trackercore/file_writer.cpp cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/file_writer.cpp
+--- cheesetracker-0.9.15.2/cheesetracker/trackercore/file_writer.cpp 2007-08-03 09:01:17.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/file_writer.cpp 2008-04-08 00:17:58.000000000 +0200
+@@ -30,6 +30,7 @@
+ * *
+ ***************************************************************************/
+
++#include <string.h>
+ #include "file_writer.h"
+
+ File_Writer::File_Writer(){
+diff -ur cheesetracker-0.9.15.2/cheesetracker/trackercore/instrument.cpp cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/instrument.cpp
+--- cheesetracker-0.9.15.2/cheesetracker/trackercore/instrument.cpp 2007-08-03 09:01:17.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/instrument.cpp 2008-04-08 00:18:34.000000000 +0200
+@@ -30,6 +30,7 @@
+ * *
+ ***************************************************************************/
+
++#include <string.h>
+ #include <cassert>
+ #include "instrument.h"
+
+diff -ur cheesetracker-0.9.15.2/cheesetracker/trackercore/voice_control.cpp cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/voice_control.cpp
+--- cheesetracker-0.9.15.2/cheesetracker/trackercore/voice_control.cpp 2007-08-03 09:01:17.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/cheesetracker/trackercore/voice_control.cpp 2008-04-08 00:19:21.000000000 +0200
+@@ -14,6 +14,7 @@
+ * *
+ ***************************************************************************/
+
++#include <stdlib.h>
+ #include "voice_control.h"
+ #include "freq_conversion.h"
+
+diff -ur cheesetracker-0.9.15.2/common/components/audio/mixer.cpp cheesetracker-0.9.15.2-fix/common/components/audio/mixer.cpp
+--- cheesetracker-0.9.15.2/common/components/audio/mixer.cpp 2007-08-22 08:09:20.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/audio/mixer.cpp 2008-04-08 00:24:42.000000000 +0200
+@@ -30,6 +30,7 @@
+ * *
+ ***************************************************************************/
+
++#include <string.h>
+ #include "mixer.h"
+ #include "math.h"
+
+diff -ur cheesetracker-0.9.15.2/common/components/data/dds.cpp cheesetracker-0.9.15.2-fix/common/components/data/dds.cpp
+--- cheesetracker-0.9.15.2/common/components/data/dds.cpp 2007-08-03 09:07:10.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/data/dds.cpp 2008-04-08 00:26:16.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <string.h>
+ #include "dds.h"
+
+
+@@ -138,7 +139,7 @@
+
+ };
+
+-vector_int& DDS::set_int_array_var(string p_var,const vector<int>& p_array) {
++vector_int& DDS::set_int_array_var(string p_var,const std::vector<int>& p_array) {
+
+ Data_Node_List::const_iterator I;
+ Data_Node new_node;
+@@ -160,7 +161,7 @@
+ return nodes[p_var].int_array;
+ }
+
+-vector_string& DDS::set_str_array_var(string p_var,const vector<string> &p_array) {
++vector_string& DDS::set_str_array_var(string p_var,const std::vector<string> &p_array) {
+
+ Data_Node_List::const_iterator I;
+ Data_Node new_node;
+@@ -183,7 +184,7 @@
+ }
+
+
+-vector_float& DDS::set_float_array_var(string p_var, const vector<float> &p_array) {
++vector_float& DDS::set_float_array_var(string p_var, const std::vector<float> &p_array) {
+
+ Data_Node_List::const_iterator I;
+ Data_Node new_node;
+@@ -367,7 +368,7 @@
+
+ }
+
+-const vector<int>& DDS::get_int_array_var(string p_var) {
++const std::vector<int>& DDS::get_int_array_var(string p_var) {
+
+ Data_Node_List::const_iterator I;
+
+@@ -382,7 +383,7 @@
+
+ }
+
+-const vector<string>& DDS::get_str_array_var(string p_var) {
++const std::vector<string>& DDS::get_str_array_var(string p_var) {
+
+ Data_Node_List::const_iterator I;
+
+@@ -398,7 +399,7 @@
+
+ }
+
+-const vector<float>& DDS::get_float_array_var(string p_var) {
++const std::vector<float>& DDS::get_float_array_var(string p_var) {
+
+ Data_Node_List::const_iterator I;
+
+diff -ur cheesetracker-0.9.15.2/common/components/data/dds.h cheesetracker-0.9.15.2-fix/common/components/data/dds.h
+--- cheesetracker-0.9.15.2/common/components/data/dds.h 2007-08-03 09:07:10.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/data/dds.h 2008-04-08 00:12:09.000000000 +0200
+@@ -25,9 +25,9 @@
+
+ class DDS;
+
+-typedef vector<int> vector_int;
+-typedef vector<string> vector_string;
+-typedef vector<float> vector_float;
++typedef std::vector<int> vector_int;
++typedef std::vector<string> vector_string;
++typedef std::vector<float> vector_float;
+ typedef VectorPointer<DDS> vector_dds;
+ typedef int data_size;
+
+@@ -79,9 +79,9 @@
+
+ };
+
+- vector<string> string_array;
+- vector<int> int_array;
+- vector<float> float_array;
++ std::vector<string> string_array;
++ std::vector<int> int_array;
++ std::vector<float> float_array;
+
+ VectorPointer<DDS> dds_array;
+
+@@ -116,9 +116,9 @@
+
+ public:
+
+- typedef vector<int> vector_int;
+- typedef vector<string> vector_string;
+- typedef vector<float> vector_float;
++ typedef std::vector<int> vector_int;
++ typedef std::vector<string> vector_string;
++ typedef std::vector<float> vector_float;
+ typedef VectorPointer<DDS> vector_dds;
+
+ Data_Node_List::const_iterator get_iterator_begin();
+diff -ur cheesetracker-0.9.15.2/common/components/data/dds_packer.cpp cheesetracker-0.9.15.2-fix/common/components/data/dds_packer.cpp
+--- cheesetracker-0.9.15.2/common/components/data/dds_packer.cpp 2007-08-03 09:07:10.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/data/dds_packer.cpp 2008-04-08 00:25:52.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <string.h>
+ #include "dds_packer.h"
+
+
+diff -ur cheesetracker-0.9.15.2/common/components/data/property_bridges.cpp cheesetracker-0.9.15.2-fix/common/components/data/property_bridges.cpp
+--- cheesetracker-0.9.15.2/common/components/data/property_bridges.cpp 2007-08-03 09:07:10.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/data/property_bridges.cpp 2008-04-08 00:26:35.000000000 +0200
+@@ -30,6 +30,7 @@
+ * *
+ ***************************************************************************/
+
++#include <string.h>
+ #include "property_bridges.h"
+
+
+diff -ur cheesetracker-0.9.15.2/common/components/file/file_access.cpp cheesetracker-0.9.15.2-fix/common/components/file/file_access.cpp
+--- cheesetracker-0.9.15.2/common/components/file/file_access.cpp 2007-08-03 09:06:08.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/components/file/file_access.cpp 2008-04-08 00:25:26.000000000 +0200
+@@ -13,6 +13,7 @@
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
++#include <string.h>
+ #include "file_access.h"
+
+ File_Manager::File_Manager() {
+diff -ur cheesetracker-0.9.15.2/common/defines/pvector.h cheesetracker-0.9.15.2-fix/common/defines/pvector.h
+--- cheesetracker-0.9.15.2/common/defines/pvector.h 2007-08-03 09:07:25.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/defines/pvector.h 2008-04-08 00:12:09.000000000 +0200
+@@ -2,12 +2,11 @@
+ #define PVECTOR_H
+
+ #include <vector>
+- using std::vector;
+
+ template<class T>
+ class VectorPointer {
+
+- vector<T*> vector;
++ std::vector<T*> vector;
+
+ public:
+
+diff -ur cheesetracker-0.9.15.2/common/drivers/posix/mutex_lock_pthreads.h cheesetracker-0.9.15.2-fix/common/drivers/posix/mutex_lock_pthreads.h
+--- cheesetracker-0.9.15.2/common/drivers/posix/mutex_lock_pthreads.h 2007-08-04 10:39:45.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/drivers/posix/mutex_lock_pthreads.h 2008-04-08 00:23:38.000000000 +0200
+@@ -39,6 +39,7 @@
+ #include <pthread.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdlib.h>
+ /**
+ [EMAIL PROTECTED] Juan Linietsky
+ */
+diff -ur cheesetracker-0.9.15.2/common/drivers/posix/sound_driver_oss.cpp cheesetracker-0.9.15.2-fix/common/drivers/posix/sound_driver_oss.cpp
+--- cheesetracker-0.9.15.2/common/drivers/posix/sound_driver_oss.cpp 2007-08-21 08:38:41.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/drivers/posix/sound_driver_oss.cpp 2008-04-08 00:27:01.000000000 +0200
+@@ -32,6 +32,7 @@
+
+ #ifdef OSS_ENABLED
+
++#include <stdlib.h>
+ #include <cerrno>
+ #include <unistd.h>
+ #include "Error.h"
+diff -ur cheesetracker-0.9.15.2/common/os/path_data.cpp cheesetracker-0.9.15.2-fix/common/os/path_data.cpp
+--- cheesetracker-0.9.15.2/common/os/path_data.cpp 2007-08-03 09:03:59.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/os/path_data.cpp 2008-04-08 00:24:13.000000000 +0200
+@@ -27,6 +27,7 @@
+ //
+ #include "path_data.h"
+ #include <stdio.h>
++#include <stdlib.h>
+
+ string Path_Data::get_home_dir() {
+
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/custom/chorus_effect.cpp cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/chorus_effect.cpp
+--- cheesetracker-0.9.15.2/common/plugins/effects/custom/chorus_effect.cpp 2007-08-03 09:04:28.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/chorus_effect.cpp 2008-04-08 00:21:23.000000000 +0200
+@@ -9,6 +9,7 @@
+ // Copyright: See COPYING file that comes with this distribution
+ //
+ //
++#include <string.h>
+ #include "chorus_effect.h"
+
+
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_echo.cpp cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_echo.cpp
+--- cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_echo.cpp 2007-08-03 09:04:28.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_echo.cpp 2008-04-08 00:22:14.000000000 +0200
+@@ -9,6 +9,7 @@
+ // Copyright: See COPYING file that comes with this distribution
+ //
+ //
++#include <string.h>
+ #include "effect_echo.h"
+
+
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_pshift.cpp cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_pshift.cpp
+--- cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_pshift.cpp 2007-08-03 09:04:28.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_pshift.cpp 2008-04-08 00:21:47.000000000 +0200
+@@ -9,6 +9,7 @@
+ // Copyright: See COPYING file that comes with this distribution
+ //
+ //
++#include <string.h>
+ #include "effect_pshift.h"
+ #include "math.h"
+
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_stereo_fx.cpp cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_stereo_fx.cpp
+--- cheesetracker-0.9.15.2/common/plugins/effects/custom/effect_stereo_fx.cpp 2007-08-03 09:04:28.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/custom/effect_stereo_fx.cpp 2008-04-08 00:20:56.000000000 +0200
+@@ -9,6 +9,7 @@
+ // Copyright: See COPYING file that comes with this distribution
+ //
+ //
++#include <string.h>
+ #include "effect_stereo_fx.h"
+
+
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/ladspa/ladspa_effect.cpp cheesetracker-0.9.15.2-fix/common/plugins/effects/ladspa/ladspa_effect.cpp
+--- cheesetracker-0.9.15.2/common/plugins/effects/ladspa/ladspa_effect.cpp 2007-08-03 09:04:12.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/ladspa/ladspa_effect.cpp 2008-04-08 00:22:39.000000000 +0200
+@@ -9,6 +9,7 @@
+ // Copyright: See COPYING file that comes with this distribution
+ //
+ //
++#include <string.h>
+ #include "ladspa_effect.h"
+
+ #ifdef LADSPA_ENABLED
+diff -ur cheesetracker-0.9.15.2/common/plugins/effects/ladspa/ladspa_effect.h cheesetracker-0.9.15.2-fix/common/plugins/effects/ladspa/ladspa_effect.h
+--- cheesetracker-0.9.15.2/common/plugins/effects/ladspa/ladspa_effect.h 2007-08-03 09:04:12.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/plugins/effects/ladspa/ladspa_effect.h 2008-04-08 00:23:03.000000000 +0200
+@@ -15,7 +15,7 @@
+
+ #ifdef LADSPA_ENABLED
+
+-
++#include <string.h>
+ #include "common/plugins/effects/ladspa/ladspa.h"
+ #include "components/audio/effect.h"
+ #include <vector>
+diff -ur cheesetracker-0.9.15.2/common/property_server/bridge_converter.cpp cheesetracker-0.9.15.2-fix/common/property_server/bridge_converter.cpp
+--- cheesetracker-0.9.15.2/common/property_server/bridge_converter.cpp 2007-08-03 09:07:20.000000000 +0200
++++ cheesetracker-0.9.15.2-fix/common/property_server/bridge_converter.cpp 2008-04-08 00:27:26.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <string.h>
+ #include "bridge_converter.h"
+
+ int BridgeConverter::get_short_string(BufferControl& p_buffer, string& p_string) {
diff -N -ur cheesetracker-0.9.15.2/debian/patches/series cheesetracker-0.9.15.2-patched/debian/patches/series
--- cheesetracker-0.9.15.2/debian/patches/series 2008-04-08 08:25:40.000000000 +0200
+++ cheesetracker-0.9.15.2-patched/debian/patches/series 2008-04-08 08:24:35.000000000 +0200
@@ -1,3 +1,4 @@
debian-use-moc-qt3.patch
debian-force-qt3-includes.patch
debian-cheesetracker_32x32_icon.patch
+debian-gcc4.3.patch