mtytel / cursynth

GNU ncurses terminal synthesizer
http://gnu.org/software/cursynth
GNU General Public License v3.0
446 stars 64 forks source link

Fails to build on arch linux (3.14.5-1-ARCH) #9

Closed zzggbb closed 9 years ago

zzggbb commented 10 years ago

I cloned the github source, and followed these directions:

$ autoreconf -i
$ ./configure
$ make

here is the log:

make  all-recursive
make[1]: Entering directory '/home/zane/packages/cursynth'
Making all in cJSON
make[2]: Entering directory '/home/zane/packages/cursynth/cJSON'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/cJSON'
Making all in rtaudio
make[2]: Entering directory '/home/zane/packages/cursynth/rtaudio'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/rtaudio'
Making all in rtmidi
make[2]: Entering directory '/home/zane/packages/cursynth/rtmidi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/rtmidi'
Making all in mopo
make[2]: Entering directory '/home/zane/packages/cursynth/mopo'
Making all in src
make[3]: Entering directory '/home/zane/packages/cursynth/mopo/src'
  CXX      mono_panner.o
In file included from mono_panner.cpp:20:0:
wave.h: In static member function ‘static mopo::mopo_float mopo::Wave::whitenoise()’:
wave.h:245:28: error: ‘rand’ was not declared in this scope
         return (2.0 * rand()) / RAND_MAX - 1;
                            ^
wave.h:245:33: error: ‘RAND_MAX’ was not declared in this scope
         return (2.0 * rand()) / RAND_MAX - 1;
                                 ^
Makefile:382: recipe for target 'mono_panner.o' failed
make[3]: *** [mono_panner.o] Error 1
make[3]: Leaving directory '/home/zane/packages/cursynth/mopo/src'
Makefile:330: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/zane/packages/cursynth/mopo'
Makefile:446: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zane/packages/cursynth'
Makefile:365: recipe for target 'all' failed
make: *** [all] Error 2

uname -srvmo: Linux 3.14.5-1-ARCH #1 SMP PREEMPT Sun Jun 1 07:36:23 CEST 2014 x86_64 GNU/Linux

bavier commented 10 years ago

The following patch should allow cursynth-1.5 to build:

--- a/mopo/src/wave.h   2014-06-25 14:10:57.827369578 -0500
+++ b/mopo/src/wave.h   2014-06-25 14:08:15.795376354 -0500
@@ -19,6 +19,7 @@
 #define WAVE_H

 #include "mopo.h"
+#include <cstdlib>
 #include <cmath>

 #define LOOKUP_SIZE 2048
mtytel commented 9 years ago

https://github.com/mtytel/cursynth/pull/12 fixes this issue.