Hi all,
I'm quite new @ PD, moreover at this list, so, don't hesitate if I'm completly wrong :)
I've been trying to compile new versions of PD into my FreeBSD 5.1. At this time, compilation breaks everywhere.
Some errors found:
- ./configure generates a "makefile" despite "Makefile". In some pd distributions exist a Makefile file by default, so "make" uses it despite "makefile".
- After ./configure, I do make ( Actually "gmake" gnu-make ): ---------------------------------------- cc -DPD -DUNIX -Wall -W -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch -DINSTALL_PREFIX="/usr/local" -I. -c -o ../obj/s_main.o s_main.c s_main.c:308: `API_DEFSTRING' undeclared here (not in a function) s_main.c:308: initializer element is not constant s_main.c:308: (near initialization for `usagemessage[17]') gmake: *** [s_main.o] Error 1
----------------------------------------
This is due to NO DEFAULTS at s_stuff.h
I change it to make it compile. I dunno much about sound capabilities at freebsd, but it's certainly true that it supports OSS, so i add these lines at s_stuff:
#define API_DEFAULT API_OSS #define API_DEFSTRING "OSS"
Now it compiles a bit more :)
But, of course, it breaks down at pthreads.... :
-------------------------------------------- cd ../obj; cc -o ../bin/pd g_canvas.o g_graph.o g_text.o g_rtext.o g_array.o g_template.o g_io.o g_scalar.o g_traversal.o g_guiconnect.o g_readwrite.o g_editor.o g_all_guis.o g_bang.o g_hdial.o g_hslider.o g_mycanvas.o g_numbox.o g_toggle.o g_vdial.o g_vslider.o g_vumeter.o m_pd.o m_class.o m_obj.o m_atom.o m_memory.o m_binbuf.o m_conf.o m_glob.o m_sched.o s_main.o s_inter.o s_file.o s_print.o s_loader.o s_path.o s_entry.o s_audio.o s_midi.o d_ugen.o d_ctl.o d_arithmetic.o d_osc.o d_filter.o d_dac.o d_misc.o d_math.o d_fft.o d_mayer_fft.o d_fftroutine.o d_array.o d_global.o d_delay.o d_resample.o x_arithmetic.o x_connective.o x_interface.o x_midi.o x_misc.o x_time.o x_acoustics.o x_net.o x_qlist.o x_gui.o d_soundfile.o \ -lm s_inter.o: In function `sys_bail': s_inter.o(.text+0x1313): undefined reference to `sys_close_midi' s_midi.o: In function `sys_putnext': s_midi.o(.text+0x1e7): undefined reference to `sys_putmidibyte' s_midi.o(.text+0x224): undefined reference to `sys_putmidimess' s_midi.o: In function `sys_pollmidiqueue': s_midi.o(.text+0xa03): undefined reference to `sys_poll_midi' s_midi.o: In function `sys_open_midi': s_midi.o(.text+0xb1b): undefined reference to `sys_do_open_midi' s_midi.o: In function `sys_listmididevs': s_midi.o(.text+0xbb9): undefined reference to `midi_getdevs' s_midi.o: In function `glob_midi_properties': s_midi.o(.text+0xd05): undefined reference to `midi_getdevs' s_midi.o: In function `glob_midi_dialog': s_midi.o(.text+0x1222): undefined reference to `sys_close_midi' x_midi.o: In function `midiout_float': x_midi.o(.text+0x16a6): undefined reference to `sys_putmidibyte' d_soundfile.o: In function `readsf_new': d_soundfile.o(.text+0x3897): undefined reference to `pthread_create' d_soundfile.o: In function `readsf_free': d_soundfile.o(.text+0x4155): undefined reference to `pthread_join' d_soundfile.o: In function `writesf_new': d_soundfile.o(.text+0x4b5b): undefined reference to `pthread_create' d_soundfile.o: In function `writesf_free': d_soundfile.o(.text+0x5235): undefined reference to `pthread_join' gmake: *** [../bin/pd] Error 1
---------------------------------
Any ideas?
Thanks in advance!
--------
Faithfully yours,
Kenneth Peiruza Systems Engineer +34-666.23.64.33 GNUnetworks Barcelona http://www.gnunetworks.com
Hi,
the configure script is not prepared to handle FreeBSD. What you would have to do is to figure out what uname -s says, then change in configure.in the line
it test `uname -s` = Linux;
to
if test `uname -s` = Linux -o `uname -s` = "FreeBSD";
(exchange FreeBSD with whatever uname -s tells you)
then do "autoconf"
This way the OSS defines should work and the midi stuff gets pulled in.
The pthreads issue is quite strange, because by default the configure should fail if there is no pthread library.
Just try it and let us know what happens. (send the output of configure too)
Guenter
On 5 Nov 2003, Kenneth Peiruza wrote:
Hi all,
I'm quite new @ PD, moreover at this list, so, don't hesitate if I'm completly wrong :)
I've been trying to compile new versions of PD into my FreeBSD 5.1. At this time, compilation breaks everywhere.
Some errors found:
./configure generates a "makefile" despite "Makefile". In some pd distributions exist a Makefile file by default, so "make" uses it despite "makefile".
After ./configure, I do make ( Actually "gmake" gnu-make ):
cc -DPD -DUNIX -Wall -W -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch -DINSTALL_PREFIX="/usr/local" -I. -c -o ../obj/s_main.o s_main.c s_main.c:308: `API_DEFSTRING' undeclared here (not in a function) s_main.c:308: initializer element is not constant s_main.c:308: (near initialization for `usagemessage[17]') gmake: *** [s_main.o] Error 1
This is due to NO DEFAULTS at s_stuff.h
I change it to make it compile. I dunno much about sound capabilities at freebsd, but it's certainly true that it supports OSS, so i add these lines at s_stuff:
#define API_DEFAULT API_OSS #define API_DEFSTRING "OSS"
Now it compiles a bit more :)
But, of course, it breaks down at pthreads.... :
cd ../obj; cc -o ../bin/pd g_canvas.o g_graph.o g_text.o g_rtext.o g_array.o g_template.o g_io.o g_scalar.o g_traversal.o g_guiconnect.o g_readwrite.o g_editor.o g_all_guis.o g_bang.o g_hdial.o g_hslider.o g_mycanvas.o g_numbox.o g_toggle.o g_vdial.o g_vslider.o g_vumeter.o m_pd.o m_class.o m_obj.o m_atom.o m_memory.o m_binbuf.o m_conf.o m_glob.o m_sched.o s_main.o s_inter.o s_file.o s_print.o s_loader.o s_path.o s_entry.o s_audio.o s_midi.o d_ugen.o d_ctl.o d_arithmetic.o d_osc.o d_filter.o d_dac.o d_misc.o d_math.o d_fft.o d_mayer_fft.o d_fftroutine.o d_array.o d_global.o d_delay.o d_resample.o x_arithmetic.o x_connective.o x_interface.o x_midi.o x_misc.o x_time.o x_acoustics.o x_net.o x_qlist.o x_gui.o d_soundfile.o \ -lm s_inter.o: In function `sys_bail': s_inter.o(.text+0x1313): undefined reference to `sys_close_midi' s_midi.o: In function `sys_putnext': s_midi.o(.text+0x1e7): undefined reference to `sys_putmidibyte' s_midi.o(.text+0x224): undefined reference to `sys_putmidimess' s_midi.o: In function `sys_pollmidiqueue': s_midi.o(.text+0xa03): undefined reference to `sys_poll_midi' s_midi.o: In function `sys_open_midi': s_midi.o(.text+0xb1b): undefined reference to `sys_do_open_midi' s_midi.o: In function `sys_listmididevs': s_midi.o(.text+0xbb9): undefined reference to `midi_getdevs' s_midi.o: In function `glob_midi_properties': s_midi.o(.text+0xd05): undefined reference to `midi_getdevs' s_midi.o: In function `glob_midi_dialog': s_midi.o(.text+0x1222): undefined reference to `sys_close_midi' x_midi.o: In function `midiout_float': x_midi.o(.text+0x16a6): undefined reference to `sys_putmidibyte' d_soundfile.o: In function `readsf_new': d_soundfile.o(.text+0x3897): undefined reference to `pthread_create' d_soundfile.o: In function `readsf_free': d_soundfile.o(.text+0x4155): undefined reference to `pthread_join' d_soundfile.o: In function `writesf_new': d_soundfile.o(.text+0x4b5b): undefined reference to `pthread_create' d_soundfile.o: In function `writesf_free': d_soundfile.o(.text+0x5235): undefined reference to `pthread_join' gmake: *** [../bin/pd] Error 1
Any ideas?
Thanks in advance!
Faithfully yours,
Kenneth Peiruza Systems Engineer +34-666.23.64.33 GNUnetworks Barcelona http://www.gnunetworks.com
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev
Hi Guenter!
Shouldn't we meet this week? ;)
I've also changed a thing which looks ugly at FreeBSD ;)
@configure.in:
EXT=pd_`uname -s`
But I needed to remove it later 'cause most files still had "_linux" name.....
Here are the results:
bash-2.05b$ autoconf bash-2.05b$
Nice ;)
Now ./configure -> OK
And make fails because it doesn't found libpthread
I've seen that is located at: /usr/local/lib/pth/
So I've changed the makefile:
LDFLAGS = -L/usr/local/lib/pth -Wl,-export-dynamic LIB = -lm -lpthread
And it now fails with: ---------------------------------------------- cc -DPD -DUNIX -Wall -W -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -DDL_OPEN -DPA_USE_OSS -DPA_LITTLE_ENDIAN -DUSEAPI_OSS -I../portaudio/pa_common -I../portaudio/pablio -I../portaudio/portmidi-macosx -Werror -DINSTALL_PREFIX="/usr/local" -I. -I/usr/include/tcl8.4 -c -o ../obj/t_main.o t_main.c t_main.c:18:16: tk.h: No such file or directory t_main.c:46: syntax error before '*' token cc1: warnings being treated as errors t_main.c:46: warning: function declaration isn't a prototype t_main.c: In function `main': t_main.c:67: warning: implicit declaration of function `Tk_Main' t_main.c:67: `Tcl_AppInit' undeclared (first use in this function) t_main.c:67: (Each undeclared identifier is reported only once t_main.c:67: for each function it appears in.) t_main.c: At top level: t_main.c:94: syntax error before "Tcl_Interp" t_main.c:17:1: unterminated #ifndef gmake: *** [t_main.o] Error 1 --------------------------------------
Well, this is only a TCL problem, so:
/usr/local/include/tk8.4/tk.h is the place, again to the Makefile!
GINCLUDE = $(INCLUDE) -I/usr/include/tcl8.4
Changed for:
GINCLUDE = $(INCLUDE) -I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4
and
LDFLAGS = -L/usr/local/lib/pth -Wl,-export-dynamic
for
LDFLAGS = -L/usr/local/lib/pth -L/usr/local/lib -Wl,-export-dynamic
----------------------------
Then it lacked of Xlib.h, so I needed to add /usr/X11R6/include to "GINCLUDE".
and, of course, I also needed the path to libtcl and libtk ....: GLIB = -lX11 -L/usr/X11R6/lib -L/usr/local/lib -ltcl84 -ltk84
AND NOW COMPILES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
but doesn't install due to my EXT change at configure.in ....
After restoring EXT=...._linux :
It COMPILES, INSTALLS AND WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please, get my patchworked makefile and do whatever you think to make FreeBSD Supported!!!
IMHO, configure lacks of tcl/tk detection, as well as libpthread, include paths of these libs and so on, it looks like 3-4 options for configure.
After changing configure.in and adding exactly what Guenter told me, it sets up everything I couldn't solve on my own, remember I don't code multimedia!
Well guys, very nice to work with you!
--------
Faithfully yours,
Kenneth Peiruza Systems Engineer +34-666.23.64.33 GNUnetworks Catalunya http://www.gnunetworks.com
On 6 Nov 2003, Kenneth Peiruza wrote:
Hi Guenter!
Shouldn't we meet this week? ;)
yes, actually last week .. sorry. ...
I've also changed a thing which looks ugly at FreeBSD ;)
@configure.in:
EXT=pd_`uname -s`
configure does not affect the externals at all, they have their own makefiles. ...
Now ./configure -> OK
And make fails because it doesn't found libpthread
I've seen that is located at: /usr/local/lib/pth/
My big guess is that configure detects everything but doesn't add the libraries (because they are in /usr/local probably ?). I will check that and try to change it, and then you can test again ... :)
Thanks a lot for your work, I think that with the information you gave it will be possible to have an officially supported FreeBSD port again.. soon.
GG.
So I've changed the makefile:
LDFLAGS = -L/usr/local/lib/pth -Wl,-export-dynamic LIB = -lm -lpthread
And it now fails with:
cc -DPD -DUNIX -Wall -W -Wstrict-prototypes -Werror -Wno-unused -Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -DDL_OPEN -DPA_USE_OSS -DPA_LITTLE_ENDIAN -DUSEAPI_OSS -I../portaudio/pa_common -I../portaudio/pablio -I../portaudio/portmidi-macosx -Werror -DINSTALL_PREFIX="/usr/local" -I. -I/usr/include/tcl8.4 -c -o ../obj/t_main.o t_main.c t_main.c:18:16: tk.h: No such file or directory t_main.c:46: syntax error before '*' token cc1: warnings being treated as errors t_main.c:46: warning: function declaration isn't a prototype t_main.c: In function `main': t_main.c:67: warning: implicit declaration of function `Tk_Main' t_main.c:67: `Tcl_AppInit' undeclared (first use in this function) t_main.c:67: (Each undeclared identifier is reported only once t_main.c:67: for each function it appears in.) t_main.c: At top level: t_main.c:94: syntax error before "Tcl_Interp" t_main.c:17:1: unterminated #ifndef gmake: *** [t_main.o] Error 1
Well, this is only a TCL problem, so:
/usr/local/include/tk8.4/tk.h is the place, again to the Makefile!
GINCLUDE = $(INCLUDE) -I/usr/include/tcl8.4
Changed for:
GINCLUDE = $(INCLUDE) -I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4
and
LDFLAGS = -L/usr/local/lib/pth -Wl,-export-dynamic
for
LDFLAGS = -L/usr/local/lib/pth -L/usr/local/lib -Wl,-export-dynamic
Then it lacked of Xlib.h, so I needed to add /usr/X11R6/include to "GINCLUDE".
and, of course, I also needed the path to libtcl and libtk ....: GLIB = -lX11 -L/usr/X11R6/lib -L/usr/local/lib -ltcl84 -ltk84
AND NOW COMPILES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
but doesn't install due to my EXT change at configure.in ....
After restoring EXT=...._linux :
It COMPILES, INSTALLS AND WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please, get my patchworked makefile and do whatever you think to make FreeBSD Supported!!!
IMHO, configure lacks of tcl/tk detection, as well as libpthread, include paths of these libs and so on, it looks like 3-4 options for configure.
After changing configure.in and adding exactly what Guenter told me, it sets up everything I couldn't solve on my own, remember I don't code multimedia!
Well guys, very nice to work with you!
Faithfully yours,
Kenneth Peiruza Systems Engineer +34-666.23.64.33 GNUnetworks Catalunya http://www.gnunetworks.com