cdsa for qnx 6

Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int, unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *, int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2

I think following will solve your compilation problem:

Patch /usr/lib/gcc-lib/ntox86/2.95.2/specs as follows:

find

*cc1plus:
-fhonor-std

and change it to

*cc1plus:
%(cc1plus_spec) -fhonor-std -fno-builtin

\

Jens

“kc” <kc@netnobound.com> wrote in message news:a81ud0$49v$1@inn.qnx.com

Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int,
unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *, int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2

Thanks for your reply.
I did modify the specs file, but it doesnt help.
Try the following simple program.

#ifdef __cplusplus
extern “C” {
#endif

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

#ifdef __cplusplus
}
#endif

int main()
{
return 0;
}

I am getting the same compilation error.

…kc

“Jens H Jorgensen” <jhj@remove-nospam-videk.com> wrote in message
news:a822v6$6vo$1@inn.qnx.com

I think following will solve your compilation problem:

Patch /usr/lib/gcc-lib/ntox86/2.95.2/specs as follows:

find

*cc1plus:
-fhonor-std

and change it to

*cc1plus:
%(cc1plus_spec) -fhonor-std -fno-builtin

\

Jens

“kc” <> kc@netnobound.com> > wrote in message news:a81ud0$49v$> 1@inn.qnx.com> …
Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int,
unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const
char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *, int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const
char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2
\

there is a bug in <string.h>.
Colin, do you have a quick fix?
Thanks!
Frank

kc <kc@netnobound.com> wrote:

Thanks for your reply.
I did modify the specs file, but it doesnt help.
Try the following simple program.

#ifdef __cplusplus
extern “C” {
#endif

#include <stdio.h
#include <stdlib.h
#include <unistd.h
#include <string.h

#ifdef __cplusplus
}
#endif

int main()
{
return 0;
}

I am getting the same compilation error.

.kc

“Jens H Jorgensen” <> jhj@remove-nospam-videk.com> > wrote in message
news:a822v6$6vo$> 1@inn.qnx.com> …
I think following will solve your compilation problem:

Patch /usr/lib/gcc-lib/ntox86/2.95.2/specs as follows:

find

*cc1plus:
-fhonor-std

and change it to

*cc1plus:
%(cc1plus_spec) -fhonor-std -fno-builtin

\

Jens

“kc” <> kc@netnobound.com> > wrote in message news:a81ud0$49v$> 1@inn.qnx.com> …
Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int,
unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const
char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *, int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const
char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2
\

Hi again,

I have some other problems with math.h header file.

  1. When I put the math.h within the extern “C” block, I get similar
    compilation error.

  2. When I put the math.h after the extern “C” block, I will not
    get any compilation error, but it complains something like
    "implicit declaration of function ‘int isnan(…)’. How am I supposed
    to use any math function in cpp file? Am I doing something wrong?

#ifdef __cplusplus
extern “C” {
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef __cplusplus
}
#endif

#include <math.h>

int main()
{
double d =1.1;
isnan(d);
return 0;
}


Please help. Thanks in advance.
…kc

<fliu@mail-nospam.vipstage.com> wrote in message
news:a82avs$c9q$1@inn.qnx.com

there is a bug in <string.h>.
Colin, do you have a quick fix?
Thanks!
Frank

kc <> kc@netnobound.com> > wrote:
Thanks for your reply.
I did modify the specs file, but it doesnt help.
Try the following simple program.

#ifdef __cplusplus
extern “C” {
#endif

#include <stdio.h
#include <stdlib.h
#include <unistd.h
#include <string.h

#ifdef __cplusplus
}
#endif

int main()
{
return 0;
}

I am getting the same compilation error.

.kc

“Jens H Jorgensen” <> jhj@remove-nospam-videk.com> > wrote in message
news:a822v6$6vo$> 1@inn.qnx.com> …
I think following will solve your compilation problem:

Patch /usr/lib/gcc-lib/ntox86/2.95.2/specs as follows:

find

*cc1plus:
-fhonor-std

and change it to

*cc1plus:
%(cc1plus_spec) -fhonor-std -fno-builtin

\

Jens

“kc” <> kc@netnobound.com> > wrote in message
news:a81ud0$49v$> 1@inn.qnx.com> …
Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int,
unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const
char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *,
int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const
char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2


\

kc wrote:

Hi again,

I have some other problems with math.h header file.

  1. When I put the math.h within the extern “C” block, I get similar
    compilation error.

  2. When I put the math.h after the extern “C” block, I will not
    get any compilation error, but it complains something like
    "implicit declaration of function ‘int isnan(…)’. How am I supposed
    to use any math function in cpp file? Am I doing something wrong?

#ifdef __cplusplus
extern “C” {
#endif
#include <stdio.h
#include <stdlib.h
#include <unistd.h
#ifdef __cplusplus
}
#endif

Correct me if I’m wrong, but none of those headers need to be
inside an extern “C” scope. They all have appropriate extern “C”
declarations of their own.

#include <math.h

int main()
{
double d =1.1;
isnan(d);
return 0;
}

Please help. Thanks in advance.
.kc

fliu@mail-nospam.vipstage.com> > wrote in message
news:a82avs$c9q$> 1@inn.qnx.com> …
there is a bug in <string.h>.
Colin, do you have a quick fix?
Thanks!
Frank

kc <> kc@netnobound.com> > wrote:
Thanks for your reply.
I did modify the specs file, but it doesnt help.
Try the following simple program.

#ifdef __cplusplus
extern “C” {
#endif

#include <stdio.h
#include <stdlib.h
#include <unistd.h
#include <string.h

#ifdef __cplusplus
}
#endif

int main()
{
return 0;
}

I am getting the same compilation error.

.kc

“Jens H Jorgensen” <> jhj@remove-nospam-videk.com> > wrote in message
news:a822v6$6vo$> 1@inn.qnx.com> …
I think following will solve your compilation problem:

Patch /usr/lib/gcc-lib/ntox86/2.95.2/specs as follows:

find

*cc1plus:
-fhonor-std

and change it to

*cc1plus:
%(cc1plus_spec) -fhonor-std -fno-builtin

\

Jens

“kc” <> kc@netnobound.com> > wrote in message
news:a81ud0$49v$> 1@inn.qnx.com> …
Hi all,

I am new to qnx and trying to port CDSA to qnx.
I am just wondering whether anyone has already port it to
qnx. If not, I currently encounter some compilation problem.
Hopefully, someone can give my insight.

Thanks in advance.
kc

/usr/include/string.h: In function void * std::memchr(void *, int, unsigned int)': /usr/include/string.h:125: declaration of C function void *
std::memchr(void *, int, uns
igned int)’ conflicts with
/usr/include/string.h:49: previous declaration const void * std::memchr(const void *, in t, unsigned int)' here /usr/include/string.h: In function void * std::memchr(void *, int,
unsigned
int)’:
/usr/include/string.h:127: passing const void *' as argument 1 of std::memchr(void *, i
nt, unsigned int)’ discards qualifiers
/usr/include/string.h: In function char * std::strchr(char *, int)': /usr/include/string.h:130: declaration of C function char *
std::strchr(char *, int)’ co
nflicts with
/usr/include/string.h:50: previous declaration const char * std::strchr(const char *, in t)' here /usr/include/string.h: In function char * std::strchr(char *, int)’:
/usr/include/string.h:132: passing const char *' as argument 1 of std::strchr(char *, i
nt)’ discards qualifiers
/usr/include/string.h: In function char * std::strpbrk(char *, const char *)': /usr/include/string.h:135: declaration of C function char *
std::strpbrk(char *, const c
har *)’ conflicts with
/usr/include/string.h:51: previous declaration const char * std::strpbrk(const char *, c onst char *)' here /usr/include/string.h: In function char * std::strpbrk(char *, const
char
*)’:
/usr/include/string.h:137: passing const char *' as argument 1 of std::strpbrk(char *,
const char *)’ discards qualifiers
/usr/include/string.h: In function char * std::strrchr(char *, int)': /usr/include/string.h:140: declaration of C function char *
std::strrchr(char *, int)’ c
onflicts with
/usr/include/string.h:52: previous declaration const char * std::strrchr(const char *, i nt)' here /usr/include/string.h: In function char * std::strrchr(char *,
int)’:
/usr/include/string.h:142: passing const char *' as argument 1 of std::strrchr(char *,
int)’ discards qualifiers
/usr/include/string.h: In function char * std::strstr(char *, const char *)': /usr/include/string.h:145: declaration of C function char *
std::strstr(char *, const ch
ar *)’ conflicts with
/usr/include/string.h:53: previous declaration const char * std::strstr(const char *, co nst char *)' here /usr/include/string.h: In function char * std::strstr(char *, const
char
*)’:
/usr/include/string.h:147: passing const char *' as argument 1 of std::strstr(char *, c
onst char *)’ discards qualifiers
make[2]: *** [ff_func.o] Error 1
make[2]: Leaving directory
/home/kclee/projects/pki/cdsa_dev/cdsa/src/addins/intel/cssmd l/mds' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/kclee/projects/pki/cdsa_dev/cdsa/src’
make: *** [all] Error 2


\