Menu

#1533 pwlib1 will not build in maccoreaudio, undeclared variable

10.5_(32-bit_Intel)
closed-fixed
5
2008-05-21
2008-05-11
No

While building pwlib1 (the actual package), maccoreaudio will not build due to the following errors:

c++ -Wno-long-double -D_REENTRANT -Wall -D__MACOSX__ -m486 -DUSE_ESD=1 -I/sw/src/fink.build/pwlib1-1.10.10-2/pwlib-1.10.10/include -O2 -O3 -fno-common -dynamic -fno-common -dynamic -fno-common -dynamic -fno-exceptions -fno-exceptions -fno-exceptions -fno-exceptions -c maccoreaudio.cxx -o /sw/src/fink.build/pwlib1-1.10.10-2/pwlib-1.10.10/lib/obj_Darwin_x86_r/maccoreaudio.o
maccoreaudio/circular_buffer.inl: In member function 'int CircularBuffer::Fill(const char*, PINDEX, Boolean, Boolean)':
maccoreaudio/circular_buffer.inl:178: error: 'MIN' was not declared in this scope
maccoreaudio/circular_buffer.inl:180: error: 'MIN' was not declared in this scope
maccoreaudio/circular_buffer.inl:183: error: 'MIN' was not declared in this scope
maccoreaudio/circular_buffer.inl: In member function 'PINDEX CircularBuffer::Drain(char*, PINDEX, Boolean)':
maccoreaudio/circular_buffer.inl:245: error: 'MIN' was not declared in this scope
maccoreaudio/circular_buffer.inl:248: error: 'MIN' was not declared in this scope
maccoreaudio.cxx: In destructor 'virtual PSoundChannelCoreAudio::~PSoundChannelCoreAudio()':
maccoreaudio.cxx:223: warning: unused variable 'error'
maccoreaudio.cxx:231: warning: unused variable 'error'
maccoreaudio.cxx:235: warning: unused variable 'error'
maccoreaudio.cxx:239: warning: unused variable 'error'
maccoreaudio.cxx:243: warning: unused variable 'error'
maccoreaudio/maccoreaudio_devices.inl: In function 'PString CADeviceName(AudioDeviceID)':
maccoreaudio/maccoreaudio_devices.inl:69: warning: NULL used in arithmetic
maccoreaudio.cxx: In static member function 'static OSStatus PSoundChannelCoreAudio::ComplexBufferFillPlayback(OpaqueAudioConverter*, UInt32*, AudioBufferList*, AudioStreamPacketDescription**, void*)':
maccoreaudio.cxx:414: error: 'MIN' was not declared in this scope
maccoreaudio.cxx: In static member function 'static OSStatus PSoundChannelCoreAudio::PlayRenderProc(void*, AudioUnitRenderActionFlags*, const AudioTimeStamp*, UInt32, UInt32, AudioBufferList*)':
maccoreaudio.cxx:480: warning: unused variable 'error'
maccoreaudio.cxx: In static member function 'static OSStatus PSoundChannelCoreAudio::RecordProc(void*, AudioUnitRenderActionFlags*, const AudioTimeStamp*, UInt32, UInt32, AudioBufferList*)':
maccoreaudio.cxx:534: warning: unused variable 'error'
maccoreaudio.cxx:553: error: 'MIN' was not declared in this scope
maccoreaudio.cxx:567: warning: unused variable 'error'
maccoreaudio.cxx: In static member function 'static OSStatus PSoundChannelCoreAudio::ComplexBufferFillRecord(OpaqueAudioConverter*, UInt32*, AudioBufferList*, AudioStreamPacketDescription**, void*)':
maccoreaudio.cxx:600: error: 'MIN' was not declared in this scope
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::CallbackSetup()':
maccoreaudio.cxx:656: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::SetupInputUnit(AudioDeviceID)':
maccoreaudio.cxx:696: warning: unused variable 'error'
maccoreaudio.cxx:699: warning: unused variable 'error'
maccoreaudio.cxx:702: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::EnableIO()':
maccoreaudio.cxx:731: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::SetupOutputUnit(AudioDeviceID)':
maccoreaudio.cxx:771: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::SetDeviceAsCurrent(AudioDeviceID)':
maccoreaudio.cxx:795: warning: unused variable 'error'
maccoreaudio.cxx:810: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::Open(const PString&, PSoundChannel::Directions, unsigned int, unsigned int, unsigned int)':
maccoreaudio.cxx:846: warning: unused variable 'error'
maccoreaudio.cxx:856: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::MatchHALOutputFormat()':
maccoreaudio.cxx:917: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::MatchHALInputFormat()':
maccoreaudio.cxx:1029: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::SetFormat(unsigned int, unsigned int, unsigned int)':
maccoreaudio.cxx:1088: warning: unused variable 'error'
maccoreaudio.cxx:1110: warning: unused variable 'error'
maccoreaudio.cxx:1117: warning: unused variable 'error'
maccoreaudio.cxx:1127: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::SetBuffers(PINDEX, PINDEX)':
maccoreaudio.cxx:1272: warning: unused variable 'error'
maccoreaudio.cxx:1282: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'OSStatus PSoundChannelCoreAudio::SetupAdditionalRecordBuffers()':
maccoreaudio.cxx:1334: warning: unused variable 'error'
maccoreaudio.cxx:1370: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::SetVolume(unsigned int)':
maccoreaudio.cxx:1519: warning: unused variable 'error'
maccoreaudio.cxx:1529: warning: unused variable 'error'
maccoreaudio.cxx:1537: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::Write(const void*, PINDEX)':
maccoreaudio.cxx:1592: warning: unused variable 'error'
maccoreaudio.cxx:1613: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::Read(void*, PINDEX)':
maccoreaudio.cxx:1674: warning: unused variable 'error'
maccoreaudio.cxx:1696: warning: unused variable 'error'
maccoreaudio.cxx: In member function 'virtual BOOL PSoundChannelCoreAudio::StartRecording()':
maccoreaudio.cxx:1731: warning: unused variable 'error'
make[2]: *** [/sw/src/fink.build/pwlib1-1.10.10-2/pwlib-1.10.10/lib/obj_Darwin_x86_r/maccoreaudio.o] Error 1
make[1]: *** [opt] Error 2
make: *** [optshared] Error 2

Discussion

  • James Mckenzie

    James Mckenzie - 2008-05-16

    Patch that eliminates build errors on Leopard

     
  • James Mckenzie

    James Mckenzie - 2008-05-16

    Logged In: YES
    user_id=1297369
    Originator: YES

    File Added: pwlib1.patch

     
  • James Mckenzie

    James Mckenzie - 2008-05-16

    Text Log file from today's build after using above patch file.

     
  • James Mckenzie

    James Mckenzie - 2008-05-16

    Logged In: YES
    user_id=1297369
    Originator: YES

    Used attached patch file to eliminate any build errors. The library files libpt_Darwin_X86_r.*.dylib are built but the final (?) libpt.dylib is not and it appears that the problem is isolated to building documentation files. Please examine the log file for the most recent build that I have attached to this issue for what happens.

    File Added: libpt_build_05152008.log

     
  • Jean-François Mertens

    Logged In: YES
    user_id=477035
    Originator: NO

    1) The part of your patch concerning MIN is fixed by the additional line in the current PatchScript
    It does not address a couple of occurrences MIN in the builddir that didn't seem to cause trouble,
    because one them had its own #define, and the others seeemed to concern other OS's _
    so if this is right, and the current patch line suffices, better leave the remaining MIN's to upstream's
    discretion _ while still mentioning the thing to them...
    (That is a.o. why I would have preferred you to test with the info file I committed, so as to be sure
    of the above.)

    Also, in general I prefer patching via the patchscript, both because it is much more concise,
    and because it makes it easier to comment and to structure the patching.
    But no problem for me to transform the remaining lines of your patch to a patchscript.

    2) As to the last 2 points, I'd also prefer to understand what exactly goes wrong under 10.5
    before committing (if only to be able to comment correctly the Patchscript ..) :
    a) under 10.4, man setpgrp and man setpgid refer to the same manpage, and they are
    defined as identical (so such a patch wouldn't do any harm on 10.4).
    What exactly has changed in 10.5 in this respect ?
    (and how did the problem manifest itself in the build ?)
    b) Similarly for deleting the coercion of sem to (int) ...
    In 10.4, /usr/include/sys/semaphore.h has a
    typedef int sem_t
    thus the coercion to (int) should be a no-op
    (and /usr/include/sys/semaphore.h has
    #define SEM_FAILED -1 )

    3) Finally your comment that
    "libpt_Darwin_X86_r.*.dylib are built but the final (?) libpt.dylib is not"
    is not very clear to me, since the last one is just a symlink to the
    others...
    And there seems to be no problem with the docs in your log..
    What I see as remaining problems is a the end :
    a) the warning about "cp -P" is immaterial _ and for the moment
    it allows to use the same syntax for "--no-dereference"
    with the cp in 10.4, in 10.5, and in coreutils.
    b) "ranlib: can't open file: libpt_Darwin_*.a (No such file or directory)"
    looks very suspicious; just before the dylib is created there is a command
    "libtool -static -o /sw/.bld/pwlib1-1.10.10-2/pwlib-1.10.10/lib/libpt_Darwin_x86_r_s.a "
    that should have created this static archive...
    Obviously this refers to Apple's libtool _ did something go wrong with that
    between 10.4 and 10.5 ?
    Can you look whether this file was really not created ?
    Or did it not get copied to the root-dir (relation to "cp -P" warning ?
    what does 'man cp' say about the -P flag ?)

    c) What stops the build is the msg:
    "chmod: getting attributes of `/sw/src/fink.build/root-pwlib1-1.10.10-2/sw/lib/libpt.dylib': No such file or directory"
    Again, that symlink should have been created a couple of lines higher (just before the ranlib msg):
    "ln -s libpt_Darwin_*_r.dylib libpt.dylib"
    ?

    JF Mertens

    PS: Feel welcome to tell me if I can add you as maintainer for this pkg !

     
  • Jean-François Mertens

    • assigned_to: nobody --> jfmertens
     
  • Jean-François Mertens

    • status: open --> closed-fixed
     
  • James Mckenzie

    James Mckenzie - 2008-05-24

    Logged In: YES
    user_id=1297369
    Originator: YES

    PEBKAC. Was using an old version of fileutils with a badly broken cp. Switched to coreutils-default and problem was solved with build. With the assistance of several people on fink-users the .info file was updated to fix several problems with the PatchScript.
    Thank you to all who helped and reminded me to fix the broken cp.

     

Log in to post a comment.