xadhoom / mod_bcg729

FreeSWITCH G.729 module using the opensource bcg729 implementation by Belledonne Communications
Other
170 stars 130 forks source link

Compilation error on FreeBSD #13

Closed rajil closed 8 years ago

rajil commented 8 years ago

Unfortunately, it doesnt compile on FreeBSD using this makefile (https://github.com/raruler/mod_bcg729/blob/master/Makefile.bsd) and gives the following error


Making all in test
Making all in bin
cc -O2 -pipe   -fPIC -O3 -fomit-frame-pointer -std=gnu99 -Qunused-arguments  -fstack-protector   -I/usr/include -Ibcg729/include -I/usr/local/freeswitch/include/freeswitch -c mod_bcg729.c
mod_bcg729.c:61:64: error: too few arguments to function call, single argument 'enableVAD' was not specified
            context->encoder_object = initBcg729EncoderChannel();
                                      ~~~~~~~~~~~~~~~~~~~~~~~~ ^
bcg729/include/bcg729/encoder.h:40:1: note: 'initBcg729EncoderChannel' declared here
BCG729_VISIBILITY bcg729EncoderChannelContextStruct *initBcg729EncoderChannel(uint8_t enableVAD);
^
bcg729/include/bcg729/encoder.h:29:27: note: expanded from macro 'BCG729_VISIBILITY'
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
                          ^
mod_bcg729.c:106:60: error: too few arguments to function call, expected 4, have 3
            bcg729Encoder(context->encoder_object, ddp, edp);
            ~~~~~~~~~~~~~                                  ^
bcg729/include/bcg729/encoder.h:62:1: note: 'bcg729Encoder' declared here
BCG729_VISIBILITY void bcg729Encoder(bcg729EncoderChannelContextStruct *encoderChannelContext, int16_t inputFrame[], uint8_t bitStream[], uint8_t *bitStreamLength);
^
bcg729/include/bcg729/encoder.h:29:27: note: expanded from macro 'BCG729_VISIBILITY'
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
                          ^
mod_bcg729.c:144:60: error: too few arguments to function call, expected 7, have 4
        bcg729Decoder(context->decoder_object, NULL, 1, ddp);
        ~~~~~~~~~~~~~                                      ^
bcg729/include/bcg729/decoder.h:60:1: note: 'bcg729Decoder' declared here
BCG729_VISIBILITY void bcg729Decoder(bcg729DecoderChannelContextStruct *decoderChannelContext, uint8_t bitStream[], uint8_t bitStreamLength, uint8_t frameErasureFlag, uint8_t SIDFrameFlag, uint8_t rfc3389PayloadFlag, int16_t signal[]);
^
bcg729/include/bcg729/decoder.h:29:27: note: expanded from macro 'BCG729_VISIBILITY'
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
                          ^
mod_bcg729.c:157:59: error: too few arguments to function call, expected 7, have 4
        bcg729Decoder(context->decoder_object, edp, 0, ddp);
        ~~~~~~~~~~~~~                                     ^
bcg729/include/bcg729/decoder.h:60:1: note: 'bcg729Decoder' declared here
BCG729_VISIBILITY void bcg729Decoder(bcg729DecoderChannelContextStruct *decoderChannelContext, uint8_t bitStream[], uint8_t bitStreamLength, uint8_t frameErasureFlag, uint8_t SIDFrameFlag, uint8_t rfc3389PayloadFlag, int16_t signal[]);
^
bcg729/include/bcg729/decoder.h:29:27: note: expanded from macro 'BCG729_VISIBILITY'
#define BCG729_VISIBILITY __attribute__ ((visibility ("default")))
                          ^
4 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/fs/mod_bcg729
xadhoom commented 8 years ago

seems that the Makefile is cloning the wrong bcg729 version, see how in my makefile I handle it:

https://github.com/xadhoom/mod_bcg729/blob/master/Makefile#L30

btw, this is another project issue, you shoult report to the fork owner :)