Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - missing function getopt_long() in libc: (8 Items)
   
missing function getopt_long() in libc  
Hi there,
while compiling some Linux sources on QNX6.4.0i got the problem that one file made use of getopt_long(). While this 
function seems to be in GNU's libc implementation, QNX' libc hasn't it inside.
Despite manually addiing the appropriate h and c files to the makefile: would it be a good idea to add the function to 
QNX' libc?

Regards,
 Michael
Re: missing function getopt_long() in libc  
On Mon, Apr 20, 2009 at 10:21:30AM -0400, michael baudisch wrote:
> Hi there,
> while compiling some Linux sources on QNX6.4.0i got the problem that one file made use of getopt_long(). While this 
function seems to be in GNU's libc implementation, QNX' libc hasn't it inside.
> Despite manually addiing the appropriate h and c files to the makefile: would it be a good idea to add the function to
 QNX' libc?

Try installing devel/libgetopt from the pkgsrc project:

ftp://ftp.netbsd.org/pub/pkgsrc/packages/QNX/i386/6.4.0_head_20081005/All/libgetopt-1.4.3.tgz

Please see this page:

http://community.qnx.com/sf/wiki/do/viewPage/projects.pkgsrc/wiki/BinaryPackages



BTW which Linux source are you trying to compile?

-seanb
Re: missing function getopt_long() in libc  
> BTW which Linux source are you trying to compile?
>
>-seanb

Hi,
thx for the info. I tried to do it without pkgsrc...

I'm trying to get RPM get running. Recently a new version has been released.

Michael
Re: missing function getopt_long() in libc  
Hello,

I am looking for the getopt_long function compiled for QNX/ARM. Is there a version out there?
If not where I can find a src package that I can build?
Thanks,
-Zahira
Re: missing function getopt_long() in libc  
Hi,

I have compiled coreutils-8.13 for QNX6.6.0 on OMAP4430_ES2.2_HS_Winchester_Rev:07 armle. But the resulting binaries 
have this error:

ldd:FATAL: Unresolved symbol "getopt_long" called from Executable

So I end up here. I have described my efforts in part here http://unix.stackexchange.com/q/141262/44370. I see this http
://qdn.qnx.com/support/knowledgebase.html?id=50130000000maSD All I see are binaries for i386. Isn't there something like
 a libgetopt.so for arm or is that even related?

I wish I knew.

Thank you!
Re: missing function getopt_long() in libc  
On 14-07-08 08:51 AM, J P wrote:
> Hi,
>
> I have compiled coreutils-8.13 for QNX6.6.0 on OMAP4430_ES2.2_HS_Winchester_Rev:07 armle. But the resulting binaries 
have this error:
>
> ldd:FATAL: Unresolved symbol "getopt_long" called from Executable
>
> So I end up here. I have described my efforts in part here http://unix.stackexchange.com/q/141262/44370. I see this 
http://qdn.qnx.com/support/knowledgebase.html?id=50130000000maSD All I see are binaries for i386. Isn't there something 
like a libgetopt.so for arm or is that even related?
>
> I wish I knew.

In QNX6.6, getopt_long was added to libc. Is that the libc you have 
loaded on your target? e.g.

$ ntoarmv7-nm libc.so.3 | grep getopt_long
0007b780 T getopt_long
0007b7a4 T getopt_long_only

There was an issue where the getopt.h header wasn't shipped with QNX 
6.6, but there's a GA patch available that contains it here.

http://www.qnx.com/download/feature.html?programid=26447

Regards,

Ryan Mansfield
Re: missing function getopt_long() in libc  
On 14-07-08 08:51 AM, J P wrote:
> Hi,
>
> I have compiled coreutils-8.13 for QNX6.6.0 on OMAP4430_ES2.2_HS_Winchester_Rev:07 armle. But the resulting binaries 
have this error:
>
> ldd:FATAL: Unresolved symbol "getopt_long" called from Executable
>
> So I end up here. I have described my efforts in part here http://unix.stackexchange.com/q/141262/44370. I see this 
http://qdn.qnx.com/support/knowledgebase.html?id=50130000000maSD All I see are binaries for i386. Isn't there something 
like a libgetopt.so for arm or is that even related?

Sorry, I should have read your overflow question first. You're trying to 
run it on a playbook, with has an earlier version of the 6.6 proc, but 
it's not the QNX 6.6.0 release so it won't have the getopt_long in libc. 
GNU coreutils is likely configuring with getopt_long because it's there 
in BB10.3. Probably if you build it with the PB toolchain, then it 
configure will find it's not there, and supply a replacement.

Regards,

Ryan Mansfield

Re: missing function getopt_long() in libc  
> On 14-07-08 08:51 AM, J P wrote:
> > Hi,
> >
> > I have compiled coreutils-8.13 for QNX6.6.0 on OMAP4430_ES2.
> 2_HS_Winchester_Rev:07 armle. But the resulting binaries have this error:
> >
> > ldd:FATAL: Unresolved symbol "getopt_long" called from Executable
> >
> > So I end up here. I have described my efforts in part here http://unix.
> stackexchange.com/q/141262/44370. I see this http://qdn.qnx.com/support/
> knowledgebase.html?id=50130000000maSD All I see are binaries for i386. Isn't 
> there something like a libgetopt.so for arm or is that even related?
> 
> Sorry, I should have read your overflow question first. You're trying to 
> run it on a playbook, with has an earlier version of the 6.6 proc, but 
> it's not the QNX 6.6.0 release so it won't have the getopt_long in libc. 
> GNU coreutils is likely configuring with getopt_long because it's there 
> in BB10.3. Probably if you build it with the PB toolchain, then it 
> configure will find it's not there, and supply a replacement.
> 
> Regards,
> 
> Ryan Mansfield
> 

Thank you for taking the time to explain. No I apologize for not making this clearer. The source link I used referred to
 installing the 2.1.0 Native SDK - that source was written 2 years ago. The link now leads to the Momentics IDE 2.1... 
with BB10.3SDK. Obviously it didn't link to that when it was written, it linked to this: https://developer.blackberry.
com/playbook/native/download/ .But the SDK contains the following release notes:

This release of the BlackBerry Native SDK for Tablet OS can support apps targeted to run on BlackBerry PlayBook OS 2.1.
1314, 2.1.0.1088, and 2.1.0.1032.

There is no mention of 2.1.0.1917 which is the last (most likely ever) release from a few months ago. I hope this is not
 an issue. Nevertheless I have downloaded it and will try again when I get that set up. I had other targets including 
gcc which built under the setup I had. Maybe it was a version which didn't leverage getopt_long. I'm just an enthusiast.
 Thank you again!