Bugs item #3596097, was opened at 2012-12-14 12:49
Message generated for change (Comment added) made by cbagwell
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3596097&group_id=10706

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ojab (ojab)
Assigned to: Nobody/Anonymous (nobody)
Summary: SoX build failure with musl libc

Initial Comment:
I've tried to build SoX with musl libc [1] and it works fine except
formats.c:419:4: error: #error FIX NEEDED HERE

Unfortunately musl hasn't any specific #define [2], so I cannot add it to the 
current implementation. 
Can this #error be downgraded to #warning or removed? Is there another way to 
build unpatched SoX sources in that situation?

[1] http://www.musl-libc.org/
[2] http://www.openwall.com/lists/musl/2012/12/14/15

----------------------------------------------------------------------

>Comment By: Chris Bagwell (cbagwell)
Date: 2012-12-14 14:23

Message:
Probably the #error mentioned should be wrapped with #ifndef NO_REWIND_PIPE
so that "./configure CPPFLAGS=-DNO_REWIND_PIPE" could be a work around. 
But since editing file is so easy, I guess we didn't do that.

I can tell from this musl git file:

http://git.musl-libc.org/cgit/musl/tree/src/stdio/fflush.c

that SoX would need a new #elif with this for our hack to work with their C
library:

  fp->rpos = fp->rbase;

As one of email links mentions, we could have a default implementation that
uses ungetc() but that would imply we created a buffer and were storing the
read data to easily do that.  Its not exactly rocket science to do that but
so far no ones wanted to spend the time to add that logic.

Since musl considers it a feature that you can't detect compiling under
them (their rational makes sense), the next easiest thing would be to add
support into SoX's configure.ac file to run a test compile of "FILE fp;
fp->rend = 0;" to see if that compiles and if so then set a #define that
formats.c key of off.

Patches are most welcome!


----------------------------------------------------------------------

Comment By: ojab (ojab)
Date: 2012-12-14 13:50

Message:
Please also take a look at http://www.openwall.com/lists/musl/2012/12/14/20
message

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3596097&group_id=10706

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to