Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian 8 fatal error: switch.h: No such file or directory #26

Open
nconder opened this issue May 16, 2018 · 3 comments
Open

Debian 8 fatal error: switch.h: No such file or directory #26

nconder opened this issue May 16, 2018 · 3 comments

Comments

@nconder
Copy link

nconder commented May 16, 2018

Having issues with Debian 8. Installed Freeswitch per their instructions https://freeswitch.org/confluence/display/FREESWITCH/Debian+8+Jessie
Error:
Ibcg729/include -I/usr/include/freeswitch -c mod_bcg729.c
mod_bcg729.c:30:20: fatal error: switch.h: No such file or directory

Full process:

root@cb-sbc:~/mod_bcg729# make
if [ ! -d bcg729 ]; then \
        git clone git://git.linphone.org/bcg729.git; \
fi
Cloning into 'bcg729'...
remote: Counting objects: 872, done.
remote: Total 872 (delta 194), reused 402 (delta 194)
Receiving objects: 100% (872/872), 657.94 KiB | 142.00 KiB/s, done.
Resolving deltas: 100% (194/194), done.
Checking connectivity... done.
pushd bcg729; git fetch; git checkout 1.0.4; popd;
~/mod_bcg729/bcg729 ~/mod_bcg729
Note: checking out '1.0.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 9ada79d... Update version.
~/mod_bcg729
cd bcg729 && sh autogen.sh && CFLAGS=-fPIC ./configure && make && cd ..
Generating build scripts for G729 codec...
+ libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
+ aclocal
+ autoheader
+ automake --force-missing --add-missing --copy
configure.ac:12: installing './compile'
configure.ac:7: installing './config.guess'
configure.ac:7: installing './config.sub'
configure.ac:11: installing './install-sh'
configure.ac:11: installing './missing'
Makefile.am: installing './INSTALL'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
test/bin/Makefile.am:17: warning: source file '$(top_srcdir)/test/src/CNGRFC3389decoderTest.c' is in a subdirectory,
test/bin/Makefile.am:17: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
test/bin/Makefile.am:4: warning: source file '$(top_srcdir)/test/src/testUtils.c' is in a subdirectory,
test/bin/Makefile.am:4: but option 'subdir-objects' is disabled
test/bin/Makefile.am:18: warning: source file '$(top_srcdir)/test/src/CNGdecoderTest.c' is in a subdirectory,
test/bin/Makefile.am:18: but option 'subdir-objects' is disabled
test/bin/Makefile.am:28: warning: source file '$(top_srcdir)/test/src/LP2LSPConversionTest.c' is in a subdirectory,
test/bin/Makefile.am:28: but option 'subdir-objects' is disabled
test/bin/Makefile.am:29: warning: source file '$(top_srcdir)/test/src/LPSynthesisFilterTest.c' is in a subdirectory,
test/bin/Makefile.am:29: but option 'subdir-objects' is disabled
test/bin/Makefile.am:30: warning: source file '$(top_srcdir)/test/src/LSPQuantizationTest.c' is in a subdirectory,
test/bin/Makefile.am:30: but option 'subdir-objects' is disabled
test/bin/Makefile.am:8: warning: source file '$(top_srcdir)/test/src/adaptativeCodebookSearchTest.c' is in a subdirectory,
test/bin/Makefile.am:8: but option 'subdir-objects' is disabled
test/bin/Makefile.am:9: warning: source file '$(top_srcdir)/test/src/computeAdaptativeCodebookGainTest.c' is in a subdirectory,
test/bin/Makefile.am:9: but option 'subdir-objects' is disabled
test/bin/Makefile.am:10: warning: source file '$(top_srcdir)/test/src/computeLPTest.c' is in a subdirectory,
test/bin/Makefile.am:10: but option 'subdir-objects' is disabled
test/bin/Makefile.am:34: warning: source file '$(top_srcdir)/test/src/computeNoiseExcitationTest.c' is in a subdirectory,
test/bin/Makefile.am:34: but option 'subdir-objects' is disabled
test/bin/Makefile.am:11: warning: source file '$(top_srcdir)/test/src/computeWeightedSpeechTest.c' is in a subdirectory,
test/bin/Makefile.am:11: but option 'subdir-objects' is disabled
test/bin/Makefile.am:12: warning: source file '$(top_srcdir)/test/src/decodeAdaptativeCodeVectorTest.c' is in a subdirectory,
test/bin/Makefile.am:12: but option 'subdir-objects' is disabled
test/bin/Makefile.am:13: warning: source file '$(top_srcdir)/test/src/decodeFixedCodeVectorTest.c' is in a subdirectory,
test/bin/Makefile.am:13: but option 'subdir-objects' is disabled
test/bin/Makefile.am:14: warning: source file '$(top_srcdir)/test/src/decodeGainsTest.c' is in a subdirectory,
test/bin/Makefile.am:14: but option 'subdir-objects' is disabled
test/bin/Makefile.am:15: warning: source file '$(top_srcdir)/test/src/decodeLSPTest.c' is in a subdirectory,
test/bin/Makefile.am:15: but option 'subdir-objects' is disabled
test/bin/Makefile.am:19: warning: source file '$(top_srcdir)/test/src/decoderMultiChannelTest.c' is in a subdirectory,
test/bin/Makefile.am:19: but option 'subdir-objects' is disabled
test/bin/Makefile.am:16: warning: source file '$(top_srcdir)/test/src/decoderTest.c' is in a subdirectory,
test/bin/Makefile.am:16: but option 'subdir-objects' is disabled
test/bin/Makefile.am:21: warning: source file '$(top_srcdir)/test/src/encoderMultiChannelTest.c' is in a subdirectory,
test/bin/Makefile.am:21: but option 'subdir-objects' is disabled
test/bin/Makefile.am:20: warning: source file '$(top_srcdir)/test/src/encoderTest.c' is in a subdirectory,
test/bin/Makefile.am:20: but option 'subdir-objects' is disabled
test/bin/Makefile.am:35: warning: source file '$(top_srcdir)/test/src/encoderVADTest.c' is in a subdirectory,
test/bin/Makefile.am:35: but option 'subdir-objects' is disabled
test/bin/Makefile.am:22: warning: source file '$(top_srcdir)/test/src/findOpenLoopPitchDelayTest.c' is in a subdirectory,
test/bin/Makefile.am:22: but option 'subdir-objects' is disabled
test/bin/Makefile.am:23: warning: source file '$(top_srcdir)/test/src/fixedCodebookSearchTest.c' is in a subdirectory,
test/bin/Makefile.am:23: but option 'subdir-objects' is disabled
test/bin/Makefile.am:24: warning: source file '$(top_srcdir)/test/src/g729FixedPointMathTest.c' is in a subdirectory,
test/bin/Makefile.am:24: but option 'subdir-objects' is disabled
test/bin/Makefile.am:26: warning: source file '$(top_srcdir)/test/src/gainQuantizationTest.c' is in a subdirectory,
test/bin/Makefile.am:26: but option 'subdir-objects' is disabled
test/bin/Makefile.am:27: warning: source file '$(top_srcdir)/test/src/interpolateqLSPAndConvert2LPTest.c' is in a subdirectory,
test/bin/Makefile.am:27: but option 'subdir-objects' is disabled
test/bin/Makefile.am:31: warning: source file '$(top_srcdir)/test/src/postFilterTest.c' is in a subdirectory,
test/bin/Makefile.am:31: but option 'subdir-objects' is disabled
test/bin/Makefile.am:32: warning: source file '$(top_srcdir)/test/src/postProcessingTest.c' is in a subdirectory,
test/bin/Makefile.am:32: but option 'subdir-objects' is disabled
test/bin/Makefile.am:33: warning: source file '$(top_srcdir)/test/src/preProcessingTest.c' is in a subdirectory,
test/bin/Makefile.am:33: but option 'subdir-objects' is disabled
+ autoconf
+ cd /root/mod_bcg729/bcg729
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating include/Makefile
config.status: creating include/bcg729/Makefile
config.status: creating test/Makefile
config.status: creating test/bin/Makefile
config.status: creating libbcg729.pc
config.status: creating bcg729.spec
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing libtool-hacking commands
make[1]: Entering directory '/root/mod_bcg729/bcg729'
make  all-recursive
make[2]: Entering directory '/root/mod_bcg729/bcg729'
Making all in include
make[3]: Entering directory '/root/mod_bcg729/bcg729/include'
Making all in bcg729
make[4]: Entering directory '/root/mod_bcg729/bcg729/include/bcg729'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/root/mod_bcg729/bcg729/include/bcg729'
make[4]: Entering directory '/root/mod_bcg729/bcg729/include'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/root/mod_bcg729/bcg729/include'
make[3]: Leaving directory '/root/mod_bcg729/bcg729/include'
Making all in src
make[3]: Entering directory '/root/mod_bcg729/bcg729/src'
  CC       LP2LSPConversion.lo
  CC       LPSynthesisFilter.lo
  CC       LSPQuantization.lo
  CC       adaptativeCodebookSearch.lo
  CC       codebooks.lo
  CC       computeAdaptativeCodebookGain.lo
  CC       computeLP.lo
  CC       computeWeightedSpeech.lo
  CC       decodeAdaptativeCodeVector.lo
  CC       decodeFixedCodeVector.lo
  CC       decodeGains.lo
  CC       decodeLSP.lo
  CC       decoder.lo
  CC       encoder.lo
  CC       findOpenLoopPitchDelay.lo
  CC       fixedCodebookSearch.lo
  CC       gainQuantization.lo
  CC       interpolateqLSP.lo
  CC       postFilter.lo
  CC       postProcessing.lo
  CC       preProcessing.lo
  CC       qLSP2LP.lo
  CC       utils.lo
  CC       cng.lo
  CC       vad.lo
  CC       dtx.lo
  CCLD     libbcg729.la
make[3]: Leaving directory '/root/mod_bcg729/bcg729/src'
Making all in test
make[3]: Entering directory '/root/mod_bcg729/bcg729/test'
Making all in bin
make[4]: Entering directory '/root/mod_bcg729/bcg729/test/bin'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/root/mod_bcg729/bcg729/test/bin'
make[4]: Entering directory '/root/mod_bcg729/bcg729/test'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/root/mod_bcg729/bcg729/test'
make[3]: Leaving directory '/root/mod_bcg729/bcg729/test'
make[3]: Entering directory '/root/mod_bcg729/bcg729'
make[3]: Leaving directory '/root/mod_bcg729/bcg729'
make[2]: Leaving directory '/root/mod_bcg729/bcg729'
make[1]: Leaving directory '/root/mod_bcg729/bcg729'
cc -fPIC -O3 -fomit-frame-pointer -fno-exceptions -Wall -std=c99 -pedantic -I/usr/include -Ibcg729/include -I/usr/include/freeswitch -c mod_bcg729.c
mod_bcg729.c:30:20: fatal error: switch.h: No such file or directory
 #include "switch.h"

@nconder nconder changed the title Debian 8 Debian 8 fatal error: switch.h: No such file or directory May 16, 2018
@digipigeon
Copy link

I am experiencing the same error on Ubuntu 16.04.4 LTS

@digipigeon
Copy link

Fixed, I got the wrong includes directory set in the Makefile, I fixed this a few times, ended up locate libteletone.h to find the correct place (after a subsequent error), this is how my Makefile now looks

### FreeSwitch headers files found in libfreeswitch-dev ###
FS_INCLUDES=/usr/local/freeswitch/include/freeswitch/
FS_MODULES=/usr/local/freeswitch/mod/
################################

And its all working fine, hope this helps you @nconder

@qualidafial
Copy link

Experienced this same error. Installing libfreeswitch-dev package fixed this without any modifications to Makefile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants