gst-inspect-1.0 fails with "g_once_init_leave: assertion 'result != 0' failed" if gstreamer-1.16 is built as static libs - static

I have built gstreamer-1.16 and its plugins (base, good, bad and ugly) with --enable-static --disable-shared --enable-static-plugins options. Looks like the build has succeeded but when I run ./gst-inspect-1.0 (from my custom build directory) I get the following errors:
(gst-plugin-scanner:2271): GLib-CRITICAL **: 09:48:43.035: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:2271): GLib-GObject-CRITICAL **: 09:48:43.035: g_type_register_static: assertion 'parent_type > 0' failed
(gst-plugin-scanner:2271): GLib-CRITICAL **: 09:48:43.035: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:2271): GLib-GObject-CRITICAL **: 09:48:43.035: g_type_register_static: assertion 'parent_type > 0' failed
(gst-plugin-scanner:2271): GLib-CRITICAL **: 09:48:43.035: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:2271): GLib-GObject-CRITICAL **: 09:48:43.035: g_type_register_static: assertion 'parent_type > 0' failed
(gst-plugin-scanner:2271): GLib-CRITICAL **: 09:48:43.035: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:2271): GLib-GObject-CRITICAL **: 09:48:43.035: g_type_register_static: assertion 'parent_type > 0' failed
(gst-plugin-scanner:2271): GLib-CRITICAL **: 09:48:43.035: g_once_init_leave: assertion 'result != 0' failed
And gst-inspect hangs.
What did I miss?

Related

Simple hello world program produces: ld: 1: Syntax error: ")" unexpected

#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
When I want to compile this sample code with gcc aa.c -o tt I get an error:
/usr/bin/ld: 1: Syntax error: ")" unexpected
collect2: error: ld returned 2 exit status
I got this error when making a repo to install and I got the below error in the log file (a portion of the file).
gcc version 7.5.0 (Ubuntu 7.5.0-6ubuntu2)
configure:3674: $? = 0
configure:3663: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3674: $? = 1
configure:3663: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3674: $? = 1
configure:3694: checking whether the C compiler works
configure:3716: gcc conftest.c >&5
/usr/bin/ld: 1: Syntax error: ")" unexpected
collect2: error: ld returned 2 exit status
configure:3720: $? = 1

How to fix ""/usr/include/string.h", line 44: syntax error at token '__dest'" when using cproto

I am compiling a C program on CentOS 6.8 and I see a lot of syntax errors in gcc include header files at token '???', but it can generate the binary eventually.
The cproto version I am using is 4.6 and I have tried gcc 4.4.7 and gcc 5.4. I am confused what went wrong with my /usr/include/*.h. Any help would be really appreciated.
Here is part of the log:
cproto -D__extension__=" " -DCPROTO -S -f 2 -I. -I/home/XXX/include -o test.pl test.c
"/usr/include/stdarg.h", line 40: syntax error at token '__builtin_va_list'
"/usr/include/libio.h", line 491: syntax error at token '__gnuc_va_list'
"/usr/include/stdio.h", line 197: syntax error at token '__asm__'
"/usr/include/stdio.h", line 282: syntax error at token '__filename'
......
"/usr/include/stdio.h", line 734: syntax error at token '__ptr'
"/usr/include/stdio.h", line 779: syntax error at token '__asm__'
"/usr/include/stdio.h", line 801: syntax error at token '__stream'
"/usr/include/stdio.h", line 803: syntax error at token '__asm__'
"/usr/include/stdlib.h", line 165: syntax error at token '__nptr'
......
"/usr/include/stdlib.h", line 210: syntax error at token '__nptr'
"/usr/include/stdlib.h", line 215: syntax error at token '__nptr'
"/usr/include/sys/select.h", line 109: syntax error at token '__readfds'
"/usr/include/stdlib.h", line 360: syntax error at token '__buf'
"/usr/include/stdlib.h", line 366: syntax error at token '__statebuf'
"/usr/include/stdlib.h", line 371: syntax error at token '__statebuf'
......
"/usr/include/string.h", line 44: syntax error at token '__dest'
"/usr/include/string.h", line 57: syntax error at token '__dest'
......
"/usr/include/fcntl.h", line 209: syntax error at token '__asm__'
"/usr/include/sys/stat.h", line 219: syntax error at token '__file'
"/usr/include/sys/stat.h", line 222: syntax error at token '__asm__'
"/usr/include/sys/stat.h", line 269: syntax error at token '__file'
"/usr/include/sys/stat.h", line 412: syntax error at token '__asm__'
"/usr/include/sys/stat.h", line 415: syntax error at token '__asm__'
"/usr/include/sys/stat.h", line 418: syntax error at token '__asm__'
"/usr/include/sys/stat.h", line 421: syntax error at token '__asm__'
gcc -g -c -m64 -gdwarf-2 -g -D__USE_XOPEN2K8 -std=gnu89 -DTPI_DEBUG -c -I. -I/home/XXX/include ./test.c

Netbeans error in c :make.exe error :build/Debug/MinGW-Windows/my-project-error.o

i am writing the following code in my netbeans sdk :
int main() {
printf("Hello World");
return 0;
}
and it gives me the following error :
make.exe[2]: *** [build/Debug/MinGW-Windows/fourier-transform.o] Error 1
make.exe[2]: Leaving directory
`/c/Users/As-/Documents/NetBeansProjects/CppApplication_1'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory
`/c/Users/As-/Documents/NetBeansProjects/CppApplication_1'
make.exe": *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 59s)
Any help in why is this error ?

Why does my Thrift (c_glib) example fail to compile with "error: invalid conversion"?

I'm trying out the thrift c_glib example (minimal version just with ping) that is available in the official thrift website, but whenever i compile the code (gcc or make) it fails with following reason:
thrift-server.c: In function ‘int main()’:
thrift-server.c:186:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘TutorialCalculatorHandler* {aka _TutorialCalculatorHandler*}’ [-fpermissive]
NULL);
^
thrift-server.c:194:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘CalculatorProcessor* {aka _CalculatorProcessor*}’ [-fpermissive]
NULL);
^
thrift-server.c:201:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘ThriftServerTransport* {aka _ThriftServerTransport*}’ [-fpermissive]
NULL);
^
thrift-server.c:208:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘ThriftTransportFactory* {aka _ThriftTransportFactory*}’ [-fpermissive]
NULL);
^
thrift-server.c:214:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘ThriftProtocolFactory* {aka _ThriftProtocolFactory*}’ [-fpermissive]
NULL);
^
thrift-server.c:225:23: error: invalid conversion from ‘gpointer {aka void*}’ to ‘ThriftServer* {aka _ThriftServer*}’ [-fpermissive]
NULL);
^
thrift-server.c:176:7: warning: unused variable ‘exit_status’ [-Wunused-variable]
int exit_status = 0;
^
thrift-server.c: At global scope:
thrift-server.c:154:1: warning: ‘void sigint_handler(int)’ defined but not used [-Wunused-function]
sigint_handler (int signal_number)
^
make: *** [server] Error 1
Any pointers will be really helpful. My GCC version is 4.8.2 and I'm on a ubuntu 14.10 box
And my makefile looks like this:
default: server
server: thrift-server.c
gcc -g -Wall -Wextra -pedantic -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -g -O2 -o thrift-server.o -c thrift-server.c /home/akhld/mobi/localcluster/codes/private/simdprototype/thrift-0.9.2/tutorial/c_glib/.libs/libtutorialgencglib.a -lgobject-2.0 -lglib-2.0 /home/akhld/mobi/localcluster/codes/private/simdprototype/thrift-0.9.2/lib/c_glib/.libs/libthrift_c_glib.so /home/akhld/mobi/localcluster/codes/private/simdprototype/thrift-0.9.2/lib/c_glib/.libs/libthrift_c_glib.so -lssl -lcrypto -lrt -lpthread -Wl,-rpath -Wl,/home/akhld/mobi/localcluster/codes/private/simdprototype/thrift-0.9.2/lib/c_glib/.libs
This is how my .thrift file looks like:
namespace cpp tutorial
service Calculator {
void ping()
}
And this is the thrift-server.c:
http://pastebin.com/Q4SGAdMu
Try compiling your code with gcc, not g++ (change the last line of your makefile). C++, but not C, requires explicit conversions from void *.
If you must use g++ for some reason, try instead adding an explicit cast to each call to g_object_new, e.g.:
handler = (TutorialCalculatorHandler *)
g_object_new (TYPE_TUTORIAL_CALCULATOR_HANDLER,
NULL);

MacPorts: Installing arm-none-linux-gnueabi-* fails

I'm trying to install the toolchain for ARM cross-compilation. I already installed GCC 4.8.
The installation of arm-none-linux-gnueabi-gcc fails with the following output:
$ sudo port install arm-none-linux-gnueabi-*
---> Cleaning arm-none-linux-gnueabi-binutils
---> Computing dependencies for arm-none-linux-gnueabi-gcc
---> Fetching archive for arm-none-linux-gnueabi-gcc
---> Attempting to fetch arm-none-linux-gnueabi-gcc-2005q3-2_0.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/arm-none-linux-gnueabi-gcc
---> Attempting to fetch arm-none-linux-gnueabi-gcc-2005q3-2_0.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/arm-none-linux-gnueabi-gcc
---> Attempting to fetch arm-none-linux-gnueabi-gcc-2005q3-2_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/arm-none-linux-gnueabi-gcc
---> Fetching distfiles for arm-none-linux-gnueabi-gcc
---> Verifying checksums for arm-none-linux-gnueabi-gcc
---> Extracting arm-none-linux-gnueabi-gcc
---> Applying patches to arm-none-linux-gnueabi-gcc
---> Configuring arm-none-linux-gnueabi-gcc
---> Building arm-none-linux-gnueabi-gcc
Error: org.macports.build for port arm-none-linux-gnueabi-gcc returned: command execution failed
Please see the log file for port arm-none-linux-gnueabi-gcc for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port arm-none-linux-gnueabi-gcc failed
The content of the log file:
version:1
...
:info:build make[1]: *** [cp/decl.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
...
:info:build 10 warnings generated.
:info:build 7 warnings generated.
:info:build 5 warnings generated.
:info:build 60 warnings generated.
:info:build 6 warnings generated.
:info:build 125 warnings generated.
:info:build 20 warnings generated.
:info:build rm arm-none-linux-gnueabi-cpp.pod fsf-funding.pod gcov.pod arm-none-linux-gnueabi-gcc.pod gfdl.pod gpl.pod
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/work/build/gcc'
:info:build make: *** [all-gcc] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/work/build'
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/work/build" && /usr/bin/make -j8 -w all AR_FOR_TARGET=arm-none-linux-gnueabi-ar AS_FOR_TARGET=arm-none-linux-gnueabi-as LD_FOR_TARGET=arm-none-linux-gnueabi-ld NM_FOR_TARGET=arm-none-linux-gnueabi-nm RANLIB_FOR_TARGET=arm-none-linux-gnueabi-ranlib
:info:build Exit code: 2
:error:build org.macports.build for port arm-none-linux-gnueabi-gcc returned: command execution failed
:debug:build Error code: CHILDSTATUS 20512 2
:debug:build Backtrace: command execution failed
while executing
"system -nice 0 $fullcmdstring"
("eval" body line 1)
invoked from within
"eval system $notty $nice \$fullcmdstring"
invoked from within
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for arm-none-linux-gnueabi-gcc: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port arm-none-linux-gnueabi-gcc for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/main.log
Thank you for sharing your ideas.
Build it with FSF gcc.
e.g.
port install arm-none-linux-gnueabi-gcc configure.compiler=macports-gcc-4.8
P.S. make sure u have gcc-4.8 installed.
This issue is caused by the command:
cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/work/build" && /usr/bin/make -j8 -w all AR_FOR_TARGET=arm-none-linux-gnueabi-ar AS_FOR_TARGET=arm-none-linux-gnueabi-as LD_FOR_TARGET=arm-none-linux-gnueabi-ld NM_FOR_TARGET=arm-none-linux-gnueabi-nm RANLIB_FOR_TARGET=arm-none-linux-gnueabi-ranlib
issueing this command the output from clang:
...
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cross_arm-none-linux-gnueabi-gcc/arm-none-linux-gnueabi-gcc/work/gcc-2005q3/gcc/cp/decl.c:11405:
./gtype-cp.h:410:7: warning: switch condition has boolean value
switch (((*x).u).h.is_lang_type_class)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gtype-cp.h:412:14: warning: overflow converting case value to switch condition type (2 to 0) [-Wswitch]
case 2:
^
./gtype-cp.h:431:14: error: duplicate case value '0'
case 0:
^
./gtype-cp.h:412:14: note: previous case defined here
case 2:
^
./gtype-cp.h:857:7: warning: switch condition has boolean value
switch (((*x).u).h.is_lang_type_class)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gtype-cp.h:859:14: warning: overflow converting case value to switch condition type (2 to 0) [-Wswitch]
case 2:
^
./gtype-cp.h:879:14: error: duplicate case value '0'
case 0:
^
./gtype-cp.h:859:14: note: previous case defined here
case 2:
^
./gtype-cp.h:1475:3: warning: switch condition has boolean value
switch (((*x).u).h.is_lang_type_class)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./gtype-cp.h:1477:10: warning: overflow converting case value to switch condition type (2 to 0) [-Wswitch]
case 2:
^
./gtype-cp.h:1511:10: error: duplicate case value '0'
case 0:
^
./gtype-cp.h:1477:10: note: previous case defined here
case 2:

Resources