[vorbis-dev] Non-gcc build problems

Jeff Squyres jsquyres at lsc.nd.edu
Wed Nov 22 08:38:03 PST 2000



I sent a message about 2 weeks ago about build problems at the head of the
CVS tree with non-gcc compilers on POSIX systems, although I didn't
correctly identify the link problems as being static-library only (see my
previous mail about "static link broken").  Some problems have been fixed,
but some still seem to be there.

I have edited my original mail to list the problems that still exist, and
attached a diff against the CVS head to show the proposed fixes.

All CVS modules
===============

- None of the Makefile.am's include "no-dependencies" in the
AUTOMAKE_OPTIONS lines.  This generates not only GNU make-specific
Makefile extensions, it also uses some gcc/g++-specific options to the
compiler.  Hence, if you're not building with gmake/gcc (which I'm not --
gcc usually doesn't give nearly as good performance as native compilers),
the compile barfs.  Here's all the Makefile.am's that I needed to put in
"no-dependencies":

        ao/src/Makefile.am
        ao/src/plugins/esd/Makefile.am
        ao/src/plugins/alsa/Makefile.am
        ao/src/plugins/oss/Makefile.am
        ogg/src/Makefile.am
        vorbis/lib/Makefile.am
        vorbis/examples/Makefile.am
        vorbis-tools/ogg123/Makefile.am
        vorbis-tools/oggencc/Makefile.am
        vorbis-tools/vorbiscomment/Makefile.am

I did not check the non-ogg/vorbis related modules (cdparanoia, etc.).

--> Solution: place "no-dependencies" in the AUTOMAKE_OPTIONS lines.
    For dependencies generation, I can provide a script (an icky
    solution, I know, but the automake docs even acknowledge that their
    solution is not) that does the Right Things for "make depend".  We use
    it in the LAM/MPI project, and it seems to be portable.

ao module
=========

- Lines 284 and 307 of ao/src/audio_out.c contain C++ comments, which
make some compilers choke (e.g., sun Forte 6).  Although C++-style
comments are now part of the C standard, it will take a while for
vendors to catch up.  To be as portable as possible, C++ style
comments should not be used in C code for a while yet.  The same thing
also happens on ao/src/ao_wav.c lines 147, 181.

--> Solution: change (ao/src/audio_out.c:284,307) and
    (ao/src/ao_wav.c:147,181) to use C-style comments.

vorbis-tools module
===================

- vorbis-tools/vorbiscomment/vorbiscomment.c line 208 has a C++ style
comment.

--> Solution: change vorbis-tools/vorbiscomment/vorbiscomment.c:208 to
    be:

        /*vorbis_analysis_init(&vd,&vi);*/

- On Solaris, <alloca.h> needs to be included before using alloca() --
Solaris' implemenation of alloca() is a #define.  This is a problem in the
oggenc package.

--> Solution: check for the presence of <alloca.h> in configure.in, and
    put something in the "Check for headers" section (which is currently
    empty).  This will necessitate a .h file of some kind, or an
    approripate -D flag in oggenc/Makefile.am.  I think there are some
    strong feelings about where #define's and #if's need to go, so I'll
    let the Coding Standards Gods say what the Right Thing is here.  :-)
--> Therefore, a solution not is provided in the attached patch

- I didn't mention in my previous mail, but vorbiscomment's Makefile.am
will not work for static linking as well.  The vorbiscomment_LDFLAGS line
needs to be fixed.

--> Solution: change "vorbiscomment_LDFLAGS" to either "LIBS" or
    "vorbiscomment_LDADD" (since there's only one program in this
    directory it doesn't really matter which), and change the order of the
    libs for proper left-to-right linking:

        vorbiscomment_LDADD = @VORBIS_LIBS@ @OGG_LIBS@

- vorbis-tools/ogg123/ogg123.c line 37 includes <getopt.h>.  This appears
to be a GNU extension, and is not portable, as not all operating systems
have it.  Indeed, the usage of "struct option" (line 83 and throughout the
rest of the file) does not appear to be portable because Solaris 2.7 and
Irix 6.5 (at least) do not appear to have it. Hence, my compilation chokes
not only upon not finding <getopt.h>, but also upon trying to use "struct
option", and all the other stuff later in the file.

--> Solution: switch to the more portable getopt(3) instead of
    getopt_long(3), or manually roll the short/long option stuff (perhaps
    steal from gcc's getopt_long...?  Since all of ogg/vorbis is GPL, this 
    shouldn't be a problem). 
--> A solution not is provided in the attached patch

-------

{+} Jeff Squyres
{+} squyres at cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness
{+} "I came to ND for 4 years and ended up staying for a decade"

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list