Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Missing mudflap wrappers?: (5 Items)
   
Missing mudflap wrappers?  
Hello:

The following was tested on 6.4.1.

Take the following code:
int main(void){
(void)inet_ntoa(0);
(void)inet_aton(0,0);
(void)gai_strerror(0);
return 0;
}

Compile as follows - works as expected (no errors or warnings):
gcc -lsocket -o missing missing.c

Now compile as follows:
gcc -fmudflap -lsocket -o missing missing.c

It complains about undefined references to __mfwrap_inet_ntoa, and __mfwrap_gai_strerror.

It does not complain about inet_aton which to me suggested that the wrappers are missing.

Is this normal behavior for mudflap?

Thanks,

Gervais
Re: Missing mudflap wrappers?  
If you using gcc directly you have to add -lmudflap

gcc  -o missing missing.c -lsocket -lmudflap


Gervais Mulongoy wrote:
> Hello:
>
> The following was tested on 6.4.1.
>
> Take the following code:
> int main(void){
> (void)inet_ntoa(0);
> (void)inet_aton(0,0);
> (void)gai_strerror(0);
> return 0;
> }
>
> Compile as follows - works as expected (no errors or warnings):
> gcc -lsocket -o missing missing.c
>
> Now compile as follows:
> gcc -fmudflap -lsocket -o missing missing.c
>
> It complains about undefined references to __mfwrap_inet_ntoa, and __mfwrap_gai_strerror.
>
> It does not complain about inet_aton which to me suggested that the wrappers are missing.
>
> Is this normal behavior for mudflap?
>
> Thanks,
>
> Gervais
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post34241
>
>   
RE: Missing mudflap wrappers?  
FYI - Adding -lmudflap made no difference from the gcc command line.

-----Original Message-----
From: Elena Laskavaia [mailto:community-noreply@qnx.com] 
Sent: July 21, 2009 2:43 PM
To: general-ide
Subject: Re: Missing mudflap wrappers?

If you using gcc directly you have to add -lmudflap

gcc  -o missing missing.c -lsocket -lmudflap


Gervais Mulongoy wrote:
> Hello:
>
> The following was tested on 6.4.1.
>
> Take the following code:
> int main(void){
> (void)inet_ntoa(0);
> (void)inet_aton(0,0);
> (void)gai_strerror(0);
> return 0;
> }
>
> Compile as follows - works as expected (no errors or warnings):
> gcc -lsocket -o missing missing.c
>
> Now compile as follows:
> gcc -fmudflap -lsocket -o missing missing.c
>
> It complains about undefined references to __mfwrap_inet_ntoa, and
__mfwrap_gai_strerror.
>
> It does not complain about inet_aton which to me suggested that the
wrappers are missing.
>
> Is this normal behavior for mudflap?
>
> Thanks,
>
> Gervais
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post34241
>
>   



_______________________________________________

General
http://community.qnx.com/sf/go/post34244
Re: Missing mudflap wrappers?  
Gervais Mulongoy wrote:
> Now compile as follows:
> gcc -fmudflap -lsocket -o missing missing.c
> 
> It complains about undefined references to __mfwrap_inet_ntoa, and __mfwrap_gai_strerror.
> 
> It does not complain about inet_aton which to me suggested that the wrappers are missing.
> 
> Is this normal behavior for mudflap?

It looks like the conftest for these functions failed and they were 
undefined in the config.h. Please file a PR.

Regards,

Ryan Mansfield
RE: Missing mudflap wrappers?  
Sounds like a plan. 

-----Original Message-----
From: Ryan Mansfield [mailto:community-noreply@qnx.com] 
Sent: July 21, 2009 2:56 PM
To: general-ide
Subject: Re: Missing mudflap wrappers?

Gervais Mulongoy wrote:
> Now compile as follows:
> gcc -fmudflap -lsocket -o missing missing.c
> 
> It complains about undefined references to __mfwrap_inet_ntoa, and
__mfwrap_gai_strerror.
> 
> It does not complain about inet_aton which to me suggested that the
wrappers are missing.
> 
> Is this normal behavior for mudflap?

It looks like the conftest for these functions failed and they were
undefined in the config.h. Please file a PR.

Regards,

Ryan Mansfield



_______________________________________________

General
http://community.qnx.com/sf/go/post34253