Subject: UADE 1.50pre10 refuses to install

From: Vlcice
Date: Mon Dec 19 16:09:23 2005

To: Kohina-UADE-Forum
I've come across an odd bug in UADE 1.50pre10. It refuses to install; whenever I type "make install" or "sudo make install" after having compiled, it simply tells me that "make: `install' is up to date."

I've also noticed that the CoreAudio driver seems to have disappeared; is this intentional?

I'm using Mac OS X 10.4.3 with Darwin 8.3.0.

---

From: shd
Date: Mon Dec 19 18:16:32 2005

To: Kohina-UADE-Forum
[quote:399f94e7df="Vlcice"]I've come across an odd bug in UADE 1.50pre10. It refuses to install; whenever I type "make install" or "sudo make install" after having compiled, it simply tells me that "make: `install' is up to date."
[/quote:399f94e7df]

What does configure print out? What does line 'all:' in Makefile say after configure? Do you use GNU make?

[quote:399f94e7df]

I'm using Mac OS X 10.4.3 with Darwin 8.3.0.[/quote:399f94e7df]

Yes. uade123 uses libao and XMMS plugin depends on XMMS output plugins.

---

From: mld/uade team
Date: Mon Dec 19 18:20:20 2005

To: Kohina-UADE-Forum
There's a libao for Mac OS X:
http://libao.darwinports.com/

Can anybody check if it works like expected?

mld/uade team

---

From: jraitala
Date: Tue Dec 20 11:57:40 2005

To: Kohina-UADE-Forum
[code:1:fc4fe4b877]$ ./configure --pkg-config=/opt/local/bin/pkg-config 
Couldn't find xmms-config -&gt; not compiling xmms-plugin!

Configuring for MacOSX

UADE and frontends will be installed to &#58; /usr/local/bin
Data directory will be                  &#58; /usr/local/share/uade2
Documentation directory will be         &#58; /usr/local/share/doc/uade-1.50
Man directory will be                   &#58; /usr/local/share/man/man1
Installer that will be used             &#58; /usr/bin/install
Make that will be used during the build &#58; /usr/bin/make
uade123                                 &#58; yes
uade123 sound output                    &#58; AO
XMMS plugin                             &#58; no
[/code:1:fc4fe4b877]

The 'all:' directive in Makefile after running configure says the following:

[code:1:fc4fe4b877]all&#58;    src/include/uadeconfig.h $&#40;UADECORE&#41; $&#40;UADE123&#41; $&#40;XMMSPLUGIN&#41;
[/code:1:fc4fe4b877]

I'm using Mac OS X 10.4.3 (Darwin 8.3.0). make links to GNU Make 3.80.

---

From: shd
Date: Tue Dec 20 12:06:11 2005

To: Kohina-UADE-Forum
[quote:66f96c86f4="jraitala"]
[code:1:66f96c86f4]all&#58;    src/include/uadeconfig.h $&#40;UADECORE&#41; $&#40;UADE123&#41; $&#40;XMMSPLUGIN&#41;
[/code:1:66f96c86f4]
[/quote:66f96c86f4]

This is a wild theory. What would happen if you:

$ rm -f INSTALL
$ make install

I don't know for sure, but I've heard rumours that Mac OS X has case insensitive filenames.

---

From: jraitala
Date: Tue Dec 20 12:15:01 2005

To: Kohina-UADE-Forum
Yeah, it works. The file system of Mac OS X indeed is case-preserving, case-insensitive by default.

---

From: shd
Date: Tue Dec 20 20:33:12 2005

To: Kohina-UADE-Forum
[quote:e3dff5c0fe="jraitala"]Yeah, it works. The file system of Mac OS X indeed is case-preserving, case-insensitive by default.[/quote:e3dff5c0fe]

I renamed INSTALL to be INSTALL.readme to avoid this problem in the future.

How does the program work on mac?

---

From: Vlcice
Date: Tue Dec 20 23:58:51 2005

To: Kohina-UADE-Forum
Not very well, unfortunately. uade123 seems to hang at "Playing time position 0.0s in subsong 0;" it doesn't progress any further, and it doesn't play any sound. Hitting enter will quit uade123. This occurs with both versions of libao I've tried, as distributed by both fink and Darwinports.

As well, the XMMS plugin will not compile. According to a tech note from Apple (http://developer.apple.com/technotes/tn2002/tn2071.html), Mac OS X GCC doesn't support the -shared switch.

---

From: shd
Date: Wed Dec 21 00:02:40 2005

To: Kohina-UADE-Forum
[quote:659b53662c="Vlcice"]Not very well, unfortunately. uade123 seems to hang at "Playing time position 0.0s in subsong 0;" it doesn't progress any further, and it doesn't play any sound. Hitting enter will quit uade123. This occurs with both versions of libao I've tried, as distributed by both fink and Darwinports.
[/quote:659b53662c]

Do you have strace or similar on mac? strace shows system calls that the program calls.

[quote:659b53662c]
As well, the XMMS plugin will not compile. According to a tech note from Apple (http://developer.apple.com/technotes/tn2002/tn2071.html), Mac OS X GCC doesn't support the -shared switch.[/quote:659b53662c]

What would happen if you used -dynamic instead of -shared? Just do:

cd src/frontends/xmms/
edit Makefile
make clean
make

and then 'make install' from the main directory.

---

From: shd
Date: Wed Dec 21 00:05:22 2005

To: Kohina-UADE-Forum
[quote:34b5181994="shd"]
[/quote:34b5181994]

What does uade123 -v song display?

---

From: Vlcice
Date: Wed Dec 21 00:50:24 2005

To: Kohina-UADE-Forum
[quote="shd"][quote:f5b132717d="shd"]
Do you have strace or similar on mac? strace shows system calls that the program calls.
[/quote:f5b132717d]

ktrace, I believe, does the same thing. The ktrace.out file and the contents of kdump's output are here, for fink: http://rapidshare.de/files/9547442/ktrace.zip.html

And here, for Darwinports: http://www.uploading.com/?get=4L0MEL45

[quote:f5b132717d]What does uade123 -v song display?[/quote:f5b132717d]

Using fink's libao,

uade: Can not find /Users/vlcice/.uade2/contentdb
dyld: lazy symbol binding failed: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

dyld: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

uadecore: No more songs to play.
Trace/BPT trap

Using Darwinports' libao,

uade: Can not find /Users/vlcice/.uade2/contentdb
hardware format...
44100.000000 mSampleRate
lpcm mFormatID
    8 mBytesPerPacket
    1 mFramesPerPacket
    8 mBytesPerFrame
    2 mChannelsPerFrame
 8192 outputBufferByteCount

mod.actionlamics-song_Eike Steffen | Dyna Blaster | 1991 | Ubi Soft : Actionamics: deduced extension: MOD
Player candidate: PTK-Prowiz
eagleplayer.conf specifies always ends.
Player: /usr/local/share/uade2/players/PTK-Prowiz (51364 bytes)
Module: mod.actionlamics-song_Eike Steffen | Dyna Blaster | 1991 | Ubi Soft : Actionamics (157496 bytes)

[quote:f5b132717d]What would happen if you used -dynamic instead of -shared? Just do:

cd src/frontends/xmms/
edit Makefile
make clean
make

and then 'make install' from the main directory.[/quote:f5b132717d]

It gives the following errors when linking and fails to compile:

ld: Undefined symbols:
_main
make[1]: *** [libuade2.so] Error 1
make: *** [xmmsplugin] Error 2

---

From: shd
Date: Wed Dec 21 00:55:34 2005

To: Kohina-UADE-Forum
[quote:a1149ab57f="Vlcice"]
ktrace, I believe, does the same thing. The ktrace.out file and the contents of kdump's output are here, for fink: http://rapidshare.de/files/9547442/ktrace.zip.html

[/quote:a1149ab57f]

Please acquire convenient web space. Well, at least I got the files.

---

From: Vlcice
Date: Wed Dec 21 01:01:53 2005

To: Kohina-UADE-Forum
[quote:06cb9e4ca3="shd"][quote:06cb9e4ca3="Vlcice"]
ktrace, I believe, does the same thing. The ktrace.out file and the contents of kdump's output are here, for fink: http://rapidshare.de/files/9547442/ktrace.zip.html

[/quote:06cb9e4ca3]

Please acquire convenient web space. Well, at least I got the files.[/quote:06cb9e4ca3]

Yes, it's fairly bad. :/ Sorry. My normal webspace has been corrupting my files recently, for no readily apparent reason, so I've been forced to use those instead recently.

---

From: shd
Date: Wed Dec 21 01:06:12 2005

To: Kohina-UADE-Forum
[quote:fb03bb0788="Vlcice"]
dyld: lazy symbol binding failed: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

[/quote:fb03bb0788]

I don't know mac, which is a problem, but my guess based on that is that something with linking doesn't go well. I'll email some people who have helped me with mac.

---

From: Vlcice
Date: Wed Dec 21 01:21:52 2005

To: Kohina-UADE-Forum
[quote:3d2567f227="shd"][quote:3d2567f227="Vlcice"]
dyld: lazy symbol binding failed: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

[/quote:3d2567f227]

I don't know mac, which is a problem, but my guess based on that is that something with linking doesn't go well. I'll email some people who have helped me with mac.[/quote:3d2567f227]

It was actually a problem on my machine, which I hadn't realized until afterwards; I've fixed it, so that the fink libao now behaves the same as the Darwinports version.

---

From: shd
Date: Wed Dec 21 01:58:15 2005

To: Kohina-UADE-Forum
[quote:03d0183d98="Vlcice"]
It was actually a problem on my machine, which I hadn't realized until afterwards; I've fixed it, so that the fink libao now behaves the same as the Darwinports version.[/quote:03d0183d98]

I emailed Michael Baltaks and Stuart Caye about the problem and hopefully they will eventually investigate this. If you have friends that are familiar with Mac development, please consult them. I do not have access to any Mac so I can't directly help here.

---

From: shd
Date: Wed Dec 21 02:10:33 2005

To: Kohina-UADE-Forum
[quote:9247295a9a="shd"]
I emailed Michael Baltaks
[/quote:9247295a9a]

And he replied fast. Can you try using:

"-dynamic -bundle -undefined suppress -force_flat_namespace"

---

From: Vlcice
Date: Wed Dec 21 03:36:23 2005

To: Kohina-UADE-Forum
Ah, the XMMS plugin compiles properly with that! I've tested it with XMMS, and it works nicely now.

Should I add those cflags to the uade123 makefile as well?

---

From: shd
Date: Wed Dec 21 21:39:16 2005

To: Kohina-UADE-Forum
[quote:5e96615ea7="Vlcice"]Ah, the XMMS plugin compiles properly with that! I've tested it with XMMS, and it works nicely now.

Should I add those cflags to the uade123 makefile as well?[/quote:5e96615ea7]

Great. I don't know.

---

From: shd
Date: Thu Dec 22 01:31:26 2005

To: Kohina-UADE-Forum
I committed a change to CVS which should fix the XMMS plugin. Please try if the configure script sets the necessary shared library flags automagically.

---

From: jraitala
Date: Mon Dec 26 12:17:39 2005

To: Kohina-UADE-Forum
Any idea how to get uade123 to work on mac? I'd prefer CLI interface, so I'm currently stuck to uade 1.03.

---

From: shd
Date: Mon Dec 26 23:39:51 2005

To: Kohina-UADE-Forum
[quote:99f7208cfa="jraitala"]Any idea how to get uade123 to work on mac? I'd prefer CLI interface, so I'm currently stuck to uade 1.03.[/quote:99f7208cfa]

No. I would have to access a mac system and read some documentation to figure out the problem. Do you know people familiar with the system? I'm hoping Michael Baltaks will assist us at some point, but I haven't heard anything from him since the shared library fix.

---

From: shd
Date: Mon Jan 2 17:23:46 2006

To: Kohina-UADE-Forum
[quote:6449357860="jraitala"]Any idea how to get uade123 to work on mac? I'd prefer CLI interface, so I'm currently stuck to uade 1.03.[/quote:6449357860]

Just a though. Is there some kind of libdl that needs to be linked for uade123 on mac?

---

From: jraitala
Date: Tue Jan 3 04:01:30 2006

To: Kohina-UADE-Forum
The problem lies in the poll() implementation of Mac OS X. It's broken.

[url]http://developer.apple.com/technotes/tn2002/tn2071.html[/url] states that poll is not supported in Mac OS X, but according to curl and lftp mailing lists Apple introduced broken poll() support with OS X Tiger (10.4). See [url]http://curl.haxx.se/mail/lib-2005-05/index.html#118[/url] and [url]http://www.mail-archive.com/lftp%40uniyar.ac.ru/msg02101.html[/url] for details.

I tried to compile uade2 with uade123 using fakepoll.h from [url]http://sealiesoftware.com/fakepoll.h[/url] instead of system poll.h, modified it a bit  to get around the immediate errors and 'make soundcheck' greeted me with a pleasant piece of music. I created a rough patch against uade-2.00 that is available at [url]http://www.jraitala.net/tmp/uade/uade-2.00-fakepoll.patch[/url].

With the patch compiling src/frontends/uade123 outputs the following:
[code:1:b3c105a594]/usr/bin/make -C src/frontends/uade123
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c uade123.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../../strlrep.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../../unixatomic.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../../uadeipc.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/amifilemagic.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c chrarray.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c playlist.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/eagleplayer.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/unixwalkdir.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/effects.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c playloop.c
playloop.c&#58; In function 'play_loop'&#58;
playloop.c&#58;407&#58; warning&#58; pointer targets in assignment differ in signedness
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c audio.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c config.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c terminal.c
In file included from terminal.c&#58;8&#58;
fakepoll.h&#58;19&#58;1&#58; warning&#58; &quot;FD_SETSIZE&quot; redefined
In file included from /usr/include/unistd.h&#58;483,
                 from terminal.c&#58;4&#58;
/usr/include/sys/select.h&#58;112&#58;1&#58; warning&#58; this is the location of the previous definition
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/postprocessing.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/uadecontrol.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/uadeconf.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -c ../common/md5.c
gcc -Wall -O2 -I../../include -I../common  -no-cpp-precomp -I/opt/local/include    -g -o uade123 uade123.o strlrep.o unixatomic.o uadeipc.o amifilemagic.o chrarray.o playlist.o eagleplayer.o unixwalkdir.o effects.o playloop.o audio.o config.o terminal.o postprocessing.o uadecontrol.o uadeconf.o md5.o -L/opt/local/lib -lao[/code:1:b3c105a594]
I didn't bother to work around the rough edges because the solution I used is just a quick hack. I don't know the proper way to deal with the poll() issue.

---

From: jraitala
Date: Tue Jan 3 05:46:01 2006

To: Kohina-UADE-Forum
Unfortunately audio skips even if I do something minor (like scrolling the mouse wheel) while uade123 is running. It's probably due to libao. I try to look at the problem later.

---

From: shd
Date: Tue Jan 3 11:53:10 2006

To: Kohina-UADE-Forum
[quote:4dc5490cb0="jraitala"]
I didn't bother to work around the rough edges because the solution I used is just a quick hack. I don't know the proper way to deal with the poll() issue.[/quote:4dc5490cb0]

Cool. Now I think I can fix the issue. Try http://zakalwe.virtuaalipalvelin.net/tmp/terminal.c

I changed poll() to select(). Does it work? Also, does mac have:

#include &lt;sys/select.h&gt;

to #include select? You will see that when it compiles. If not, then you can use:

       #include &lt;sys/time.h&gt;
       #include &lt;sys/types.h&gt;
       #include &lt;unistd.h&gt;

---

From: shd
Date: Tue Jan 3 11:53:42 2006

To: Kohina-UADE-Forum
[quote:a47993a379="jraitala"]Unfortunately audio skips even if I do something minor (like scrolling the mouse wheel) while uade123 is running. It's probably due to libao. I try to look at the problem later.[/quote:a47993a379]

I think so too. Could you ask libao authors about this issue?

---

From: jraitala
Date: Tue Jan 3 18:09:39 2006

To: Kohina-UADE-Forum
The code you provided compiles and runs without modification.

---

From: shd
Date: Tue Jan 3 18:25:34 2006

To: Kohina-UADE-Forum
[quote:af9fa8bfbc="jraitala"]The code you provided compiles and runs without modification.[/quote:af9fa8bfbc]

I've made some changes in the CVS. Could you check out latest and see if uade123 and XMMS plugin both work? What should I attribute in the change log entry? Currently it says:

        - Fixed Mac OS X compatibility issue. poll() was replaced with
          select(). Thanks to jraitala.

Want name, nick or email?

---

From: shd
Date: Tue Jan 3 18:27:00 2006

To: Kohina-UADE-Forum
[quote:b843897adb="jraitala"]The code you provided compiles and runs without modification.[/quote:b843897adb]

Also, I added requirements to our web page:

http://zakalwe.virtuaalipalvelin.net/uade/

 Requirements for compiling and running UADE 2.xx:

    * Bash (or similar shell)
    * GNU Make
    * Install
    * libAO (for uade123)
    * pkg-config (for configuring)
    * Sed (for configuring)
    * Sufficiently modern GCC environment (portable types from stdint.h)
    * XMMS development kit (for XMMS plugin)

    * Preferably /dev/urandom for uade123 playlist randomization

Are those enough for Mac OS X too, or do you need something else?

---

From: jraitala
Date: Tue Jan 3 19:20:23 2006

To: Kohina-UADE-Forum
[quote:373359272d="shd"]I've made some changes in the CVS. Could you check out latest and see if uade123 and XMMS plugin both work? What should I attribute in the change log entry? Currently it says:

Want name, nick or email?[/quote:373359272d]

I try it out later tonight. My real name (Juuso Raitala) can be mentioned if that kind of appreciation is appropiate.

---

From: jraitala
Date: Tue Jan 3 19:26:50 2006

To: Kohina-UADE-Forum
[quote:1c862205a5="shd"]Are those enough for Mac OS X too, or do you need something else?[/quote:1c862205a5]

I think those are fine on Mac OS X, too. I believe Xcode includes most of the required stuff (gnumake, install, gcc).

---

From: jraitala
Date: Tue Jan 3 19:33:47 2006

To: Kohina-UADE-Forum
I got libao to function by increasing its buffer size as suggested in [url]http://trac.xiph.org/cgi-bin/trac.cgi/ticket/727[/url]. The fix does have a shortcoming: due to large buffer size music keeps playing after stopping it. I'll investigate the subject more a bit later.

---

From: jraitala
Date: Tue Jan 3 21:44:52 2006

To: Kohina-UADE-Forum
I compiled uade from CVS and both uade123 and xmms plugin work.