Build Chromium with error about libgio on Ubuntu 10.04 - build

I tried to build Chromium on my Ubuntu 10.04 with the cmd, ninja -v -C out/Debug chrome.
But I got this error, and found nothing by googling related information.
I've followed the instructions on http://code.google.com/p/chromium/wiki/LinuxBuildInstructions before building.
Could someone help me if you know how to resovle this? Thanks a lot.
In file included from obj/build/linux/gio.gen/libgio_loader.cc:4:
../../out/Debug/gen/library_loaders/libgio.h:28: error: ‘::g_settings_new’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:29: error: ‘::g_settings_get_child’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:30: error: ‘::g_settings_get_string’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:31: error: ‘::g_settings_get_boolean’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:32: error: ‘::g_settings_get_int’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:33: error: ‘::g_settings_get_strv’ has not been declared
../../out/Debug/gen/library_loaders/libgio.h:34: error: ‘::g_settings_list_schemas’ has not been declared
obj/build/linux/gio.gen/libgio_loader.cc: In member function ‘bool LibGioLoader::Load(const std::string&)’:
obj/build/linux/gio.gen/libgio_loader.cc:42: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:56: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:70: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:84: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:98: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:112: error: cast from ‘void*’ to ‘int’ loses precision
obj/build/linux/gio.gen/libgio_loader.cc:126: error: cast from ‘void*’ to ‘int’ loses precision
ninja: build stopped: subcommand failed.

https://codereview.chromium.org/21687002
Remove bundled gsettings header now that we're using Ubuntu Precise. you can build with 12.04

I was also facing the same issue. Digging up a little bit more, I found that the latest releases of GTK doesn't have above APIs. Please follow the below steps to build Chromium on Ubuntu 10.04:
Download an old release of GTK, for ex. from http://ftp.gnome.org/pub/gnome/sources/glib/2.38/glib-2.38.2.tar.xz
Extract, configure, compile and install this.
Re-generate your chromium projects
Build again using ninja -C out/Debug chrome

Related

Error when compiling a CUDA program: invalid type argument of unary ‘*’ (have ‘int’)

I (or somebody else) is compiling a CUDA program (e.g. vectorAdd from the cuda-api-wrappers library) using CUDA 11.6 and GCC 12.1, with C++17 set as the language standard. I get the following error:
/usr/include/c++/12.1.0/bits/locale_facets_nonio.tcc: In member function ‘_InIter std::__cxx11::time_get<_CharT, _InIter>::get(iter_type, iter_type, std::ios_base&, std::ios_base::iostate&, tm*, const char_type*, const char_type*) const’:
/usr/include/c++/12.1.0/bits/locale_facets_nonio.tcc:1477:77: error: invalid type argument of unary ‘*’ (have ‘int’)
1477 | if ((void*)(this->*(&time_get::do_get)) == (void*)(&time_get::do_get))
| ^
This is weird, since I can't seem to relate it to anything in the program or the header-only library. Also, the error goes away if we compile using the C++14 language standard.
What exactly is the problem here, and how can I work around it / fix it?
CUDA 11.6 is known to be incompatible with GCC 12.x; see:
CUDA incompatible with my gcc version
The error you see is probably due to this incompatibility, and will go away if you use GCC 11.x.

Twister Core compilation Error

I am trying to compile twister-core on windows 8.1 (64 bit) using Cygwin.
I am following the steps which are given in the link Compile Twister for Windows
I have copy the code from here :Github "Twister-Core"
I have run the “./bootstrap.sh” successfully without any error.
When I am running the “make” command it show the error and make process failed:
Error: /usr/include/boost/asio/detail/config.hpp:577:5: error: #error
You must add -D__USE_W32_SOCKETS to your compiler options.
# error You must add -D__USE_W32_SOCKETS to your compiler options. /usr/include/openssl/x509.h:192:1: error: pasting “stack_st_” and “(”
does not give a valid preprocessing token DECLARE_STACK_OF(X509_NAME)
^ /usr/include/openssl/pkcs7.h:103:1: error: pasting “stack_st_” and
“(” does not give a valid preprocessing token
DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
/usr/include/openssl/x509v3.h:753:30: error: expected
primary-expression before ‘unsigned’ unsigned long chtype); ^
/usr/include/openssl/x509v3.h:753:50: error: expression list treated
as compound expression in initializer [-fpermissive] unsigned long
chtype); ^ Makefile:1407: recipe for target
‘libtorrent/src/web_connection_base.o’ failed make: ***
[libtorrent/src/web_connection_base.o] Error 1
Adding -DOPENSSL_SYS_WIN32 to the compiler options did the trick for me with OpenSSL version 1.0.2r.

program with boost thread 1.51 doesn't build

I am trying to compile a program using boost thread with the latest version. I am using
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)
With the 1.50 I had an issue saying that the reference to boost::thread::~thrad() couldn't be found. So I updated to the new one I got the following
/usr/local/include/boost/thread/detail/thread.hpp:65: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:68: error: expected `;' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:88: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:91: error: expected `;' before 'void'
/usr/local/include/boost/thread/detail/thread.hpp:105: error: expected ';' before 'thread_data'
/usr/local/include/boost/thread/detail/thread.hpp:108: error: expected `;' before 'void'
/usr/local/include/boost/thread/detail/thread.hpp:121: error: expected ';' before 'private'
/usr/local/include/boost/thread/detail/thread.hpp:153: error: expected primary-expression before ')' token
/usr/local/include/boost/thread/detail/thread.hpp:153: error: there are no arguments to 'BOOST_THREAD_RV_REF' that depend on a template parameter, so a declaration of 'BOOST_THREAD_RV_REF' must be available
/usr/local/include/boost/thread/detail/thread.hpp:153: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/boost/thread/detail/thread.hpp:153: error: expected `)' before 'f'
/usr/local/include/boost/thread/detail/thread.hpp:153: error: invalid in-class initialization of static data member of non-integral type 'boost::detail::thread_data_ptr'
/usr/local/include/boost/thread/detail/thread.hpp:153: confused by earlier errors, bailing out
I had no clue why is doing this way. Is there any workaround?
I had this same issue with g++ 4.2.1 on OSX, though I don't think its a compiler issue per se.
I had previously installed boost libraries and headers installed to /usr/local/lib and /usr/local/include by invoking b2 install. This works on a new installation, but it doesn't correctly overwrite a previous boost installation (I had 1.49). All I had to do was point my build at the boost build directory I was using, or to delete /usr/local/include/boost and run b2 install again. The first time I ran b2 install it only copied the libs which was fast, the second time it took much longer and copied over all the header files.

How do I get Anjuta to higlight errors/lines produced by my build system (waf)?

Waf outputs errors like the following
Waf: Entering directory `/home/atomos/dc_mmo/netclient/build'
[47/53] c: c_lib/c_lib.c -> build/c_lib/c_lib.c.1.o
In file included from ../c_lib/c_lib.c:12:
../c_lib/./physics/common.c: In function ‘rk4_accelerate’:
../c_lib/./physics/common.c:301: warning: unused variable ‘spring’
In file included from ../c_lib/c_lib.c:15:
../c_lib/./objects/grenade.c: In function ‘grenade_draw’:
../c_lib/./objects/grenade.c:91: error: ‘a’ undeclared (first use in this function)
../c_lib/./objects/grenade.c:91: error: (Each undeclared identifier is reported only once
../c_lib/./objects/grenade.c:91: error: for each function it appears in.)
In file included from ../c_lib/c_lib.c:16:
../c_lib/./objects/neutron.c: In function ‘neutron_draw’:
../c_lib/./objects/neutron.c:191: error: ‘a’ undeclared (first use in this function)
In file included from ../c_lib/./agent/agent_include.h:21,
from ../c_lib/c_lib.c:23:
../c_lib/./agent/./agent_client.c: In function ‘set_agent_control_state’:
../c_lib/./agent/./agent_client.c:58: warning: format ‘%i’ expects type ‘int’, but argument 2 has type ‘int *’
How can i get Anjuta to show errors at bottom and allow me to jump to error by clicking on it?
How can I configure Anjuta to run my build system on compile?
The problem is that eclipse looks for make: in the error code (this should be configurable) So you have to patch eclipse or waf so they agree on the format of the error message.
There was a patch to waf in this bug

Can't install OpenGLRaw-1.1.0.1 on OS X

When I run
$ cabal install OpenGLRaw
I get the following errors.
... ... ...
cbits/HsOpenGLRaw.c:78:20:
error: stdlib.h: No such file or directory
cbits/HsOpenGLRaw.c:79:19:
error: dlfcn.h: No such file or directory
cbits/HsOpenGLRaw.c: In function ‘hs_OpenGLRaw_getProcAddress’:
cbits/HsOpenGLRaw.c:97:0:
error: ‘NULL’ undeclared (first use in this function)
cbits/HsOpenGLRaw.c:97:0:
error: (Each undeclared identifier is reported only once
cbits/HsOpenGLRaw.c:97:0: error: for each function it appears in.)
cbits/HsOpenGLRaw.c:104:0:
warning: implicit declaration of function ‘dlopen’
cbits/HsOpenGLRaw.c:104:0:
error: ‘RTLD_LAZY’ undeclared (first use in this function)
cbits/HsOpenGLRaw.c:104:0:
warning: assignment makes pointer from integer without a cast
cbits/HsOpenGLRaw.c:115:0:
warning: implicit declaration of function ‘dlsym’
cbits/HsOpenGLRaw.c:115:0:
warning: assignment makes pointer from integer without a cast
cbits/HsOpenGLRaw.c:126:0:
warning: return makes pointer from integer without a cast
cabal: Error: some packages failed to install:
OpenGLRaw-1.1.0.1 failed during the building phase. The exception was:
ExitFailure 1
I just installed the latest Haskell Platform for OS X and ran cabal update for good measure.
Looks to me like ticket #5011 - XCode 4 on Mac + GHC 7.0.2 fails to link.
This is fixed in GHC 7.0.3 which will be part of the mid-April release of the Haskell Platform.
And alternative fix is to downgrade to the 2010.2 Haskell Platform.