libgpg-error HAVE_CONFIG_H - cygwin

I'm trying to compile libgpg-error on cygwin but don't seem to be able to get pass the following errors during the make
gen-posix-lock-obj.c:39:3: error: #error sizeof pthread_mutex_t is not known.
# error sizeof pthread_mutex_t is not known.
^
gen-posix-lock-obj.c: In function ‘main’:
gen-posix-lock-obj.c:55:21: error: ‘SIZEOF_PTHREAD_MUTEX_T’ undeclared (first use in this function)
if (sizeof mtx != SIZEOF_PTHREAD_MUTEX_T)
^
gen-posix-lock-obj.c:55:21: note: each undeclared identifier is reported only once for each function it appears in
gen-posix-lock-obj.c:84:11: error: ‘HOST_TRIPLET_STRING’ undeclared (first use in this function)
HOST_TRIPLET_STRING,
the errors are triggered because HAVE_CONFIG_H doesn't seem to be set. I would imagine this would happen during the configure process, but i guess not. Any idea where to look at? I'm not that familiar with the whole automake stuff and some pointers on where to get started or a solution would be great

Related

Use of static_assert forbidden in Android project

I am porting some C++ code to Android. One of the source files includes a webrtc header file that causes error during compilation. I have reduced the problem to this simple code:
template <class T, int n>
struct DefaultDeleter<T[n]> {
// Never allow someone to declare something like scoped_ptr<int[10]>.
static_assert(sizeof(T) == -1, "do not use array with size as type");
};
The error I get is:
[armeabi-v7a] Compile++ thumb: dummyclient <= dummy.cpp
dummy.cpp:7:3: warning: identifier 'static_assert' will become a keyword in C++0x [-Wc++0x-compat]
dummy.cpp:5:8: error: 'DefaultDeleter' is not a template
dummy.cpp:7:17: error: expected identifier before 'sizeof'
dummy.cpp:7:17: error: expected ',' or '...' before 'sizeof'
dummy.cpp:7:70: error: ISO C++ forbids declaration of 'static_assert' with no type [-fpermissive]
The same code compiles fine on Windows and Linux. Is there some compiler settings that are required for Android? Regards.
You need to pass the CPPFLAG -std=c++11.

Unknown symbol dentry_path

I'm using the method dentry_path in my kernel module, compilation work fine but when loading the kernel module I go the error message:
Error: could not insert module my_mod.ko: Unknown symbol in module
And in /var/log/kern.log
May 8 19:45:10 zUbuntu kernel: [ 1173.105984] my_mod: Unknown symbol dentry_path (err 0)
This method is declared like the following:
extern char *dentry_path(struct dentry *, char *, int);
Could you please explain me why I can't link my module using this method ?
I think you need to use dentry_path_raw instead of dentry_path, cause dentry_path isn't exported. Also, dentry_path_raw is the safer version between these two, it's protected with a writelock.

BusyBox: Error during make

I try to install BusyBox 1.20.2 on a embedded system with PowerPc. At first I want to try it with the default config.
So this are the commands
make defconfig
make
And this is the result:
ma-bash-3.2# make
CC miscutils/ubi_tools.o
miscutils/ubi_tools.c: In function 'ubi_tools_main':
miscutils/ubi_tools.c:137: error: 'UBI_DEV_NUM_AUTO' undeclared (first use in this function)
miscutils/ubi_tools.c:137: error: (Each undeclared identifier is reported only once
miscutils/ubi_tools.c:137: error: for each function it appears in.)
miscutils/ubi_tools.c:157: error: storage size of 'req' isn't known
miscutils/ubi_tools.c:165: error: 'UBI_IOCATT' undeclared (first use in this function)
miscutils/ubi_tools.c:157: warning: unused variable 'req'
miscutils/ubi_tools.c:171: error: 'UBI_IOCDET' undeclared (first use in this function)
make[1]: *** [miscutils/ubi_tools.o] Error 1
make: *** [miscutils] Error 2
How is it possible to solve that Error?
Can I disable this ubi_tool ? What effects will that have and how to do that?
Remove these lines in .config:
CONFIG_UBIATTACH=y
CONFIG_UBIDETACH=y
CONFIG_UBIMKVOL=y
CONFIG_UBIRMVOL=y
CONFIG_UBIRSVOL=y
CONFIG_UBIUPDATEVOL=y
you won't have support for ubifs.

Error in compiling libcurl application for arm

i am trying to compile libcurl for arm (am-1808), the compilation works fine but when i try to build an application using libcurl, i got some errors, here are the steps i followed:
1.
./configure --host=arm-none-linux --build=i686-linux CFLAGS='-Os' --disable-ftp --disable-tftp --disable-ldap --disable-telnet --disable-dict --disable-ipv6 --disable-ares --disable-sspi --disable-cookies --disable-crypto-auth --without-libidn --without-ssl --without-zlib --without-libssh2 --without-gnutls --without-nss --without-ca-bundle --enable-smtp
2.
make
3.
sudo make install
Everything works fine up-to this step, but now on compiling a sample application i got these errors:
usama#ubuntu:~/Desktop/smtp$ arm-none-linux-gnueabi-gcc -o email smtp-multi.c -lcurl
smtp-multi.c:27:23: error: curl/curl.h: No such file or directory
smtp-multi.c:77: error: return type is an incomplete type
smtp-multi.c: In function 'tvnow':
smtp-multi.c:81: error: storage size of 'now' isn't known
smtp-multi.c:84: warning: 'return' with a value, in function returning void
smtp-multi.c: At top level:
smtp-multi.c:87: error: parameter 1 ('newer') has incomplete type
smtp-multi.c:87: error: parameter 2 ('older') has incomplete type
smtp-multi.c: In function 'main':
smtp-multi.c:95: error: 'CURL' undeclared (first use in this function)
smtp-multi.c:95: error: (Each undeclared identifier is reported only once
smtp-multi.c:95: error: for each function it appears in.)
smtp-multi.c:95: error: 'curl' undeclared (first use in this function)
smtp-multi.c:96: error: 'CURLM' undeclared (first use in this function)
smtp-multi.c:96: error: 'mcurl' undeclared (first use in this function)
smtp-multi.c:98: error: storage size of 'mp_start' isn't known
smtp-multi.c:105: error: 'CURL_GLOBAL_DEFAULT' undeclared (first use in this function)
smtp-multi.c:115: warning: assignment makes pointer from integer without a cast
smtp-multi.c:120: error: 'CURLOPT_URL' undeclared (first use in this function)
smtp-multi.c:121: error: 'CURLOPT_USERNAME' undeclared (first use in this function)
smtp-multi.c:122: error: 'CURLOPT_PASSWORD' undeclared (first use in this function)
smtp-multi.c:123: error: 'CURLOPT_READFUNCTION' undeclared (first use in this function)
smtp-multi.c:124: error: 'CURLOPT_MAIL_FROM' undeclared (first use in this function)
smtp-multi.c:125: error: 'CURLOPT_MAIL_RCPT' undeclared (first use in this function)
smtp-multi.c:126: error: 'CURLOPT_USE_SSL' undeclared (first use in this function)
smtp-multi.c:126: error: 'CURLUSESSL_ALL' undeclared (first use in this function)
smtp-multi.c:127: error: 'CURLOPT_SSL_VERIFYPEER' undeclared (first use in this function)
smtp-multi.c:128: error: 'CURLOPT_SSL_VERIFYHOST' undeclared (first use in this function)
smtp-multi.c:129: error: 'CURLOPT_READDATA' undeclared (first use in this function)
smtp-multi.c:130: error: 'CURLOPT_VERBOSE' undeclared (first use in this function)
smtp-multi.c:131: error: 'CURLOPT_SSLVERSION' undeclared (first use in this function)
smtp-multi.c:132: error: 'CURLOPT_SSL_SESSIONID_CACHE' undeclared (first use in this function)
smtp-multi.c:142: error: storage size of 'timeout' isn't known
smtp-multi.c:145: error: 'fd_set' undeclared (first use in this function)
smtp-multi.c:145: error: expected ';' before 'fdread'
smtp-multi.c:146: error: expected ';' before 'fdwrite'
smtp-multi.c:147: error: expected ';' before 'fdexcep'
smtp-multi.c:152: error: 'fdread' undeclared (first use in this function)
smtp-multi.c:153: error: 'fdwrite' undeclared (first use in this function)
smtp-multi.c:154: error: 'fdexcep' undeclared (first use in this function)
smtp-multi.c:180: error: invalid use of void expression
smtp-multi.c:180: error: type of formal parameter 1 is incomplete
smtp-multi.c:180: error: type of formal parameter 2 is incomplete
smtp-multi.c:181: warning: incompatible implicit declaration of built-in function 'fprintf'
smtp-multi.c:181: error: 'stderr' undeclared (first use in this function)
May be i did something wrong in the configuration while setting ./configure, any idea how can i get rid of these errors ?
regards
usama
There was problem in the configuration option, --host option was not correct, the correct argument for --host is arm-none-linux-gnueabi
so the correct configure command is (SSL should preferably be enabled).
./configure --host=arm-none-linux-gnueabi --build=i686-linux CFLAGS='-Os' --disable-ftp --disable-tftp --disable-ldap --disable-telnet --disable-dict --disable-ipv6 --disable-ares --disable-sspi --disable-cookies --disable-crypto-auth --without-libidn --without-zlib --without-libssh2 --without-gnutls --without-nss --without-ca-bundle --with-ssl=PATH --enable-smtp
NOTE:
Give path to OpenSSL in place of PATH in --with-ssl

when I include atomic.h, GCC says No such file, why?

I want to use atomic API, and I include . I don't know how to use it! Thank you!
I have it in /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic.h.
I also add -I/usr/src/linux-headers-2.6.28-11/arch/x86/include/ and -I/usr/src/linux-headers-2.6.28-11/include.
Some other errors is produced because of -DCONFIG_X86_32 and -D__KERNEL__ macro undefined.
Then I define the two macros,
some errors occurred:
/usr/src/linux-headers-2.6.28-11/include/linux/cpumask.h:600:37: error: "and" may not appear in macro parameter list
/usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/processor.h:159:1: warning: "cache_line_size" redefined
/usr/src/linux-headers-2.6.28-11/include/linux/cache.h:64:1: warning: this is the location of the previous definition
/usr/src/linux-headers-2.6.28-11/include/linux/stddef.h:16: error: expected identifier before ‘false’
/usr/src/linux-headers-2.6.28-11/include/linux/stddef.h:16: error: expected `}' before ‘false’
/usr/src/linux-headers-2.6.28-11/include/linux/stddef.h:16: error: expected unqualified-id before ‘false’
/usr/src/linux-headers-2.6.28-11/include/linux/stddef.h:18: error: expected declaration before ‘}’ token
My system is ubuntu 9.04 running on Virtualbox3.0.
If you know where the file is on your HD, then you say gcc mySource.c -I/path/to/atomic
note that this assumes you include "atomic" directly. and not "some/path/atmomic.h"

Resources