Doug:
> I have just committed the spec files and patches for audacity to the
> spec-files-extra repository on sourceforge.
Funny timing. I was looking into building a spec file for Audacity at
the same time as you, but you beat me to it.
> It needs the latest build of
> SFEgcc which used gnu ld and contains the Intel mmx API. Also
> SFEwxwidgets-gnu needs to be rebuilt with SFEgcc. My testing so far
> shows there are some issues with the oss drivers which need to be fixed.
What issues have you found with the OSS drivers? I'm cc:ing the
OpenSound-ext at sun.com mailing list, so that the OSS team can look
into this. Now that we have a working SFEaudacity.spec file, perhaps
the OSS team can look into why there are problems using it on Solaris.
---
I was able to build audacity okay with Sun Studio instead of needing
SFEgcc. I did need to build SFEwxwidgets-gnu and SFEpulseaudio.
I don't like the fact that libmad is listed as a dependency. This
dependency should be removed, I think. We shouldn't force people to
link in modules that contain IP. audacity works just fine without mp3
support. Users who want mp3 support can build libmad before they
build SFEaudacity if they want, but SFEaudacity shouldn't require
it. I notice that SFElibsamplerate and SFElibid3tag are also listed
as dependencies. I didn't build with these. Why are these listed
as required if they aren't really needed? Or is my build of audacity
broken in some way since I didn't build with these?
I had to make a few additional changes, to get it to build with
Sun Studio. I didn't really get to the point where I can provide
patches, but I can explain the hacks I had to do.
- I hacked the SFEaudacity.spec file to not set dbgopt, and also
commented out these lines:
+#perl -pi -e 's/-M ...wl./--version-script=/'
lib-src/portaudio-v19/libtool
+#perl -pi -e 's/-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect//'
src/Makefile
+#perl -pi -e 's/-Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect//'
tests/Makefile
Perhaps the spec file could be made smarter so it only does the
above when building with gcc ld? Or maybe we can get rid of this
cruft if we just fix the spec file so it builds with either linker?
- In the following two header files, I needed to fix them so that
ALLOW_SSE doesn't get set. I just commented out the setting of
the #define, but it would probably be better to fix these header
files so that ALLOW_SSE only gets set if the right version of GCC
is used.
lib-src/soundtouch/include/STTypes.h
lib-src/soundtouch/soundtouch/STTypes.h
Or perhaps just unsetting ALLOW_OPTIMIZATIONS in these header files
might be better if building with Sun Studio? Perhaps we could use
mediaLib here for better Sun support?
#ifdef __SUNPRO_C is the right ifdef for Sun Studio C compiler &
#ifdef __SUNPRO_CC is the right ifdef for Sun Studio C++ compiler.
- I needed to rerun configure in lib-src/portaudio-v19 so that it
doesn't try to use -version-script when linking. I think this is
the only thing that really requires the new gcc linker. I needed to
include the --disable-flac option when running configure so it didn't
try to link in the nonexistant FLAC C++ header files.
I also found the generated Makefile had a few problems that I
hacked around:
- Sun Studio doesn't like the -pthread argument. I removed this.
- SUBDIRS is set to nothing, and this makes the following commands
mad:
for dir in $(SUBDIRS); do make -C $$dir all; done
It seems Makefile doesn't like it when $(SUBDIRS) is empty. So I
hacked the Makefile to not do this.
Probably should fix the configure/Makefile generation so that it
builds properly when using Sun Studio.
- I noticed PA_LIBS in src/Makefile wasn't getting set by configure
properly. Not sure why, so I just hacked src/Makefile to link in
-lportaudio -lm -lpthread, which is the value in the
lib-src/portaudio-v19/portaudio-2.0.pc file. Probably need to fix
the top-level configure.ac so it does this so it works on Solaris?
- I needed to fix src/Makefile so that the GTK libraries got included
on the link statement. Sun Studio is more picky that dependent
libraries be listed.
After doing all this, I can run audacity building with Sun Studio.
- I found if I prune the LINGUAS in locale/Makefile to the following, I
don't need to update SFEgettext. This might be handy information for
people who want to build this, but who don't want to update gettext.
LINGUAS=af ar bn bg ca cs cy el es eu fi ga gl hu it ja lt mk nl pt ro
ru sk sl sv tr zh
Brian