Hello when i ./autogen.sh && ./configure && make && make check && sudo make install i get an error : mxf_labels_and_keys.c: In function 'mxf_get_jpeg2000_coding_label':
mxf_labels_and_keys.c:180:13: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
Makefile:615: recipe for target 'libMXF_1.0_la-mxf_labels_and_keys.lo' failed
make[2]: *** [libMXF_1.0_la-mxf_labels_and_keys.lo] Error 1
make[2]: Leaving directory '/home/ingex/bmx/libMXF/mxf'
Makefile:466: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ingex/bmx/libMXF'
Makefile:374: recipe for target 'all' failed
make: *** [all] Error 2
i tried openSuse 12.2 - 12.3 - 13.2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The compiler would need a C flag as the error message suggested. However, this is very old and unmaintained code. The latest libMXF (within bmx) can be found here https://github.com/bbc/bmx/tree/main/deps/libMXF
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry i am new to linux, how do i git clone from the site you linked and then compile it? I am following the installation guide, are there any other new files the the ones in there? Is there a new guide to follow?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could clone and build using these steps:
* The "Code" button on the main (bmx) page has the clone link, https://github.com/bbc/bmx.git.
* Run git clone https://github.com/bbc/bmx.git to clone it into the bmx/ directory.
* Install the libMXF dependencies, e.g. sudo apt install uuid-dev if you're on Ubuntu or Debian
* Install cmake, e.g. sudo apt install cmake
* Follow the commands listed here to build libMXF
Follow a similar process if you want to build bmx using the instructions in the [bmx README]https://github.com/bbc/bmx/tree/main
If you happen to want macOS or Windows binaries then they are available in the Releases
There is also a bmxtools Docker image that contains the bmx (and libMXF) tools
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok i created bmx folder and downloaded bmx,libmxf,libmxfpp(is that the new libmxf++). I run openSUSE 13.2 what is the command to compile it (sudo apt install uuid-dev and sudo apt install cmake dont work? (i used to enter to each folder and run ./autogen.sh && ./configure && make && make check && sudo make install).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what version of ubundu should i install to build ingex so you will be able to help me please? Also are there any new versions of codecs-for-ffmpeg, ffmpeg-DNxHD and shttpd?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know what Leap is but ffmpeg and the codecs it provides will have had many updates and it looks like from a quick search that shttpd hasn't been updated since 2008.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you said that The compiler would need a C flag as the error message suggested. so i should ./autogen.sh && ./configure && make && make check && sudo make install and then what C flag so it does compile?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello , i try to build the libmxf with cmake --build . and i get the error : [ 2%] Checking the git repository for changes... [ 2%] Built target libmxf_check_git [ 4%] Built target libmxf_git_version [ 6%] Building C object mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o
/home/ingex/mxf/mxf_labels_and_keys.c: In function ‘mxf_get_jpeg2000_coding_label’:
/home/ingex/mxf/mxf_labels_and_keys.c:180:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
/home/ingex/mxf/mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
mxf/CMakeFiles/MXF.dir/build.make:215: recipe for target 'mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o' failed
gmake[2]: *** [mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o] Error 1
CMakeFiles/Makefile2:277: recipe for target 'mxf/CMakeFiles/MXF.dir/all' failed
gmake[1]: *** [mxf/CMakeFiles/MXF.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
can you please help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It looks like your compiler does not support C++11, which is a requirement that is set at https://github.com/bbc/bmx/blob/main/CMakeLists.txt#L37. OpenSUSE 13.2 is from around 2014 and I guess the version of gcc/g++ installed is equally old.
A fix for just libMXF is to change the line in libMXF https://github.com/bbc/bmx/blob/main/deps/libMXF/CMakeLists.txt#L38 to set(CMAKE_C_STANDARD 99), i.e. use c99. Then build using cmake in the deps/libMXF directory because the rest of bmx that uses C++ can't be built without C++11 support.
However, this version of libMXF is a lot newer than the one used in Ingex, is unlikely to be compatible and so won't work if you need it for Ingex.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
when i try to build the recommended for ingex libmx i get the error :
mxf_labels_and_keys.c: In function 'mxf_get_jpeg2000_coding_label':
mxf_labels_and_keys.c:180:13: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
Makefile:615: recipe for target 'libMXF_1.0_la-mxf_labels_and_keys.lo' failed
make[2]: *** [libMXF_1.0_la-mxf_labels_and_keys.lo] Error 1
make[2]: Leaving directory '/home/ingex/bmx/libMXF/mxf'
Makefile:466: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ingex/bmx/libMXF'
Makefile:374: recipe for target 'all' failed
make: *** [all] Error 2
can you help me please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could try one of these changes in configure.ac (in order) to see which one enables C99 support
* add "AC_PROG_CC_STDC" after "AC_PROG_CC"
* add "AC_PROG_CC_C99" after "AC_PROG_CC"
* add the option "-std=gnu99" to the end of LIBMXF_CFLAGS=...
* add the option "-std=c99" to the end of LIBMXF_CFLAGS=...
Change "AM_SILENT_RULES([yes])" to "AM_SILENT_RULES([no])" to see the compiler commands
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello, the c99 problem is gone after i did what you suggested and i thank you. Now i have another problem:
ingex@testr:~/bmx/libMXF> ./autogen.sh && ./configure && make && make check && sudo make install
+ aclocal -I m4
+ libtoolize -c
+ autoheader -f
+ automake --foreign --add-missing -c
+ autoconf
configure: loading site script /usr/share/site/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... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... yes
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 dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/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-suse-linux-gnu file names to x86_64-suse-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-suse-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/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 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... no
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/x86_64-suse-linux/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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
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 dependency style of gcc... (cached) gcc3
./configure: line 16202: syntax error near unexpected token ('
./configure: line 16202: $as_echo_n "(cached) " >&6'
and it stops here, please help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know what the issue could be. Try make clean or manually remove generated files? Also, if you say the C99 error is fixed then I don't understand how this ./configure command failure is happening before the make where the C99 error was.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello when i ./autogen.sh && ./configure && make && make check && sudo make install i get an error : mxf_labels_and_keys.c: In function 'mxf_get_jpeg2000_coding_label':
mxf_labels_and_keys.c:180:13: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
Makefile:615: recipe for target 'libMXF_1.0_la-mxf_labels_and_keys.lo' failed
make[2]: *** [libMXF_1.0_la-mxf_labels_and_keys.lo] Error 1
make[2]: Leaving directory '/home/ingex/bmx/libMXF/mxf'
Makefile:466: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ingex/bmx/libMXF'
Makefile:374: recipe for target 'all' failed
make: *** [all] Error 2
i tried openSuse 12.2 - 12.3 - 13.2.
The compiler would need a C flag as the error message suggested. However, this is very old and unmaintained code. The latest libMXF (within bmx) can be found here https://github.com/bbc/bmx/tree/main/deps/libMXF
Sorry i am new to linux, how do i git clone from the site you linked and then compile it? I am following the installation guide, are there any other new files the the ones in there? Is there a new guide to follow?
You could clone and build using these steps:
* The "Code" button on the main (bmx) page has the clone link, https://github.com/bbc/bmx.git.
* Run
git clone https://github.com/bbc/bmx.git
to clone it into the bmx/ directory.* Install the libMXF dependencies, e.g.
sudo apt install uuid-dev
if you're on Ubuntu or Debian* Install cmake, e.g.
sudo apt install cmake
* Follow the commands listed here to build libMXF
Follow a similar process if you want to build bmx using the instructions in the [bmx README]https://github.com/bbc/bmx/tree/main
If you happen to want macOS or Windows binaries then they are available in the Releases
There is also a bmxtools Docker image that contains the bmx (and libMXF) tools
ok i created bmx folder and downloaded bmx,libmxf,libmxfpp(is that the new libmxf++). I run openSUSE 13.2 what is the command to compile it (sudo apt install uuid-dev and sudo apt install cmake dont work? (i used to enter to each folder and run ./autogen.sh && ./configure && make && make check && sudo make install).
It's been 20 years since I used openSUSE. A google search suggests that you can use zypper to install stuff: https://software.opensuse.org/download/package?package=uuid&project=openSUSE%3A13.1 and https://software.opensuse.org/download.html?project=openSUSE%3A13.2%3AUpdate&package=cmake
The autoconf build is no longer supported and has been replaced with cmake.
what version of ubundu should i install to build ingex so you will be able to help me please? Also are there any new versions of codecs-for-ffmpeg, ffmpeg-DNxHD and shttpd?
Sorry, I can't help with building Ingex.
do you know if there are any new versions of codecs-for-ffmpeg, ffmpeg-DNxHD and shttpd so i can use them with Leap?
I don't know what Leap is but ffmpeg and the codecs it provides will have had many updates and it looks like from a quick search that shttpd hasn't been updated since 2008.
you said that The compiler would need a C flag as the error message suggested. so i should ./autogen.sh && ./configure && make && make check && sudo make install and then what C flag so it does compile?
Hello , i try to build the libmxf with cmake --build . and i get the error :
[ 2%] Checking the git repository for changes...
[ 2%] Built target libmxf_check_git
[ 4%] Built target libmxf_git_version
[ 6%] Building C object mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o
/home/ingex/mxf/mxf_labels_and_keys.c: In function ‘mxf_get_jpeg2000_coding_label’:
/home/ingex/mxf/mxf_labels_and_keys.c:180:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
/home/ingex/mxf/mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
mxf/CMakeFiles/MXF.dir/build.make:215: recipe for target 'mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o' failed
gmake[2]: *** [mxf/CMakeFiles/MXF.dir/mxf_labels_and_keys.c.o] Error 1
CMakeFiles/Makefile2:277: recipe for target 'mxf/CMakeFiles/MXF.dir/all' failed
gmake[1]: *** [mxf/CMakeFiles/MXF.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
can you please help me?
It looks like your compiler does not support C++11, which is a requirement that is set at https://github.com/bbc/bmx/blob/main/CMakeLists.txt#L37. OpenSUSE 13.2 is from around 2014 and I guess the version of gcc/g++ installed is equally old.
A fix for just libMXF is to change the line in libMXF https://github.com/bbc/bmx/blob/main/deps/libMXF/CMakeLists.txt#L38 to
set(CMAKE_C_STANDARD 99)
, i.e. use c99. Then build using cmake in the deps/libMXF directory because the rest of bmx that uses C++ can't be built without C++11 support.However, this version of libMXF is a lot newer than the one used in Ingex, is unlikely to be compatible and so won't work if you need it for Ingex.
when i try to build the recommended for ingex libmx i get the error :
mxf_labels_and_keys.c: In function 'mxf_get_jpeg2000_coding_label':
mxf_labels_and_keys.c:180:13: error: 'for' loop initial declarations are only allowed in C99 mode
for (uint8_t ml = 4; ml < main_level; ml++)
^
mxf_labels_and_keys.c:180:13: note: use option -std=c99 or -std=gnu99 to compile your code
Makefile:615: recipe for target 'libMXF_1.0_la-mxf_labels_and_keys.lo' failed
make[2]: *** [libMXF_1.0_la-mxf_labels_and_keys.lo] Error 1
make[2]: Leaving directory '/home/ingex/bmx/libMXF/mxf'
Makefile:466: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ingex/bmx/libMXF'
Makefile:374: recipe for target 'all' failed
make: *** [all] Error 2
can you help me please?
You could try one of these changes in configure.ac (in order) to see which one enables C99 support
* add "AC_PROG_CC_STDC" after "AC_PROG_CC"
* add "AC_PROG_CC_C99" after "AC_PROG_CC"
* add the option "-std=gnu99" to the end of LIBMXF_CFLAGS=...
* add the option "-std=c99" to the end of LIBMXF_CFLAGS=...
Change "AM_SILENT_RULES([yes])" to "AM_SILENT_RULES([no])" to see the compiler commands
hello, the c99 problem is gone after i did what you suggested and i thank you. Now i have another problem:
ingex@testr:~/bmx/libMXF> ./autogen.sh && ./configure && make && make check && sudo make install
+ aclocal -I m4
+ libtoolize -c
+ autoheader -f
+ automake --foreign --add-missing -c
+ autoconf
configure: loading site script /usr/share/site/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... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... yes
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 dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/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-suse-linux-gnu file names to x86_64-suse-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-suse-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-suse-linux/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 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... no
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/x86_64-suse-linux/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 g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-suse-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
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 dependency style of gcc... (cached) gcc3
./configure: line 16202: syntax error near unexpected token
(' ./configure: line 16202:
$as_echo_n "(cached) " >&6'and it stops here, please help
I don't know what the issue could be. Try
make clean
or manually remove generated files? Also, if you say the C99 error is fixed then I don't understand how this./configure
command failure is happening before themake
where the C99 error was.