Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - add new compiler under QNX Momentics IDE: (25 Items)
   
add new compiler under QNX Momentics IDE  
I posted the similar message before, but I could not find it from this websiet ... Anyway, I got the old configuraiton 
files from ICC 8.1 (with QNX support). I compared the file name against the default configuration files, they are quite 
different. Since the ICC 8.1 only support Windows version, I need to make significant change on the old configuration 
files. But, first, I would like to confirm these file name still legitimate.
icc_ntox86_acprts.conf
icc_ntox86_acprts++.conf

icc_ntox86.conf
icc_ntox86++.conf

icc_ntox86_cprts.conf
icc_ntox86_cprts++.conf

icc_ntox86_gpp.conf
icc_ntox86_gpp++.conf

Please let me know if you want to include the old configuration files as attatchment
Larry
Re: add new compiler under QNX Momentics IDE  
> I posted the similar message before, but I could not find it from this websiet
>  ... Anyway, I got the old configuraiton files from ICC 8.1 (with QNX support)
> . I compared the file name against the default configuration files, they are 
> quite different. Since the ICC 8.1 only support Windows version, I need to 
> make significant change on the old configuration files.

What significant changes do you need to do?  The qcc conf files for the ICC 8.1 compiler are very basic. They call the 
icc driver directly with very simple options (-c, -E, -L, etc).  I believe Intel wrote a simple script to generate the 
conf files for the 8.1 compiler. If you can locate that script, it would be easier then modifying the existing conf 
files by hand. 

For example:

icc_ntox86

        cpp_deprecated=yes

        cpp=$(IA32ROOT)/bin/icc.exe

        cpp_opt=-E

        cc=$(IA32ROOT)/bin/icc.exe
        ...

Has the name of the icc driver changed between 8.1 and 10? Or has any of these options changed?  If you remove the .exe 
extension from the driver, you should be able to make the qcc conf files host independent as the  $IA32ROOT env variable
 should take care of the different install path on various hosts. 

> like to confirm these file name still legitimate.

The configuration names go <compiler>_<target>_<targetlibs>. 

The ICC 8.1 compiler shipped three C++ libraries. The Dinkumware abridged, complete and the GNU C++. The file names 
would be the same if   ICC 10 is going to provide the same C++ library variants.

> Please let me know if you want to include the old configuration files as 
> attatchment

I've got a copy. If you have questions about what needs to be changed, please let me know.

Regards,

Ryan Mansfield


Re: add new compiler under QNX Momentics IDE  
Hello Ryan,
    I'm not aware any script that could be used to generate the configuration files. Could you provide me the script (if
 it was part of the QNX tool)? When I manually create a directory under gcc

host/linux/x86/etc/qcc/intel/10.1.011

, and copy all the icc*.cfg to this directory. By doing so, it would choke the Momentics IDE. The error message is not 
helpful since it points to internal java code. I had to remove the directory to continue my development, but I still 
could not invoke icc under Momentic IDE

   If that works for you, could you send your response to my e-mail address at

   liang-min.wang@intel.com

Larry 
Re: add new compiler under QNX Momentics IDE  
> Hello Ryan,
>     I'm not aware any script that could be used to generate the configuration 
> files. Could you provide me the script (if it was part of the QNX tool)? 

Sorry, we don't have a copy of script used to generate the conf files for icc 8.1. I noticed in the qcc conf files for 
ICC 8.1, there is a cvs_id tag  that might help you track it down the owner/location of the script.

# cvs_id[] = "$Id: icc_ntox86.conf,v 1.3.4.2 2004/09/20 23:39:58 rdweldon Exp $"

> I manually create a directory under gcc
> 
> host/linux/x86/etc/qcc/intel/10.1.011
> 
> , and copy all the icc*.cfg to this directory. 

Do you mean *.conf or *.cfg? With the 8.1 compiler, icc *.cfg files lived under $IA32ROOT/bin/ directory. The qcc .conf 
files lived in $QNX_HOST/etc/qcc/icc/8.1/

> By doing so, it would choke the
>  Momentics IDE. The error message is not helpful since it points to internal 
> java code. I had to remove the directory to continue my development, but I 
> still could not invoke icc under Momentic IDE

I recommend to try getting the conf files working with the qcc driver from the command line before checking the 
integration with the IDE. As I said before, the IDE picks up whatever compiler configurations are available in the $
QNX_HOST/etc/qcc/ directory, so if it works properly from the command line, it should work within the IDE.

For example:

qcc -V10.1.011,icc_ntox86_gcc t.c -v  and then checking to make sure that qcc was properly calling icc.

For example

$ qcc -V8.1,icc_ntox86 t.c -v
cc: looking for icc_ntox86 in C:/QNX630/host/win32/x86/etc/qcc/icc/8.1/icc_ntox8
6++.conf
cc: looking for icc_ntox86 in C:/QNX630/host/win32/x86/etc/qcc/icc/8.1/icc_ntox8
6.conf
C:\Intel\Compiler81\EIA\/bin/icc.exe -S t.c -o C:\DOCUME~1\RMANSF~1\LOCALS~1\Tem
p\4qccc8L3Va\t.s 


Regards,

Ryan Mansfield



Re: add new compiler under QNX Momentics IDE  
I just tried the command mode, and I believe that I have the right file in the right place, but the command failed with 
these error message

root@ubuntu01:/opt/qnx632/host/linux/x86/usr/bin# ./qcc -V10.1.011,icc_ntox86 t.c -v
cc: looking for icc_ntox86 in /opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86++.conf
cc: looking for icc_ntox86 in /opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86.conf
 t.c -o /tmp/file87ThrQ_qcc_6442/t.s
 failed: No such file or directory/bin/icc
cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
cc: removing  /tmp/file87ThrQ_qcc_6442
 error 1/intel/cc/10.1.011/bin/icc
cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
cc: removing  /tmp/file87ThrQ_qcc_6442

In my icc_ntox86.conf, I have these statements:

# %END_INFORMATION_BLOCK%

icc_ntox86_cprts



	cpp_deprecated=yes



	cpp=$(IA32ROOT)/bin/icpc


when I type 'printenv | grep IA32ROOT, it does have the definition:

IA32ROOT=/opt/intel/cc/10.1.011

Do I need to change the syntax for passing environment variables since the conf files were copied from Windows version 
of ICC?

Re: add new compiler under QNX Momentics IDE  
the attachment are my two conf files under gcc/icc/10.1.011
Attachment: Compressed file conf.tar 40 KB
Re: add new compiler under QNX Momentics IDE  
> root@ubuntu01:/opt/qnx632/host/linux/x86/usr/bin# ./qcc -V10.1.011,icc_ntox86 
> t.c -v
> cc: looking for icc_ntox86 in /opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/
> icc_ntox86++.conf
> cc: looking for icc_ntox86 in /opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/
> icc_ntox86.conf
>  t.c -o /tmp/file87ThrQ_qcc_6442/t.s
>  failed: No such file or directory/bin/icc
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
> cc: removing  /tmp/file87ThrQ_qcc_6442
>  error 1/intel/cc/10.1.011/bin/icc
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
> cc: removing  /tmp/file87ThrQ_qcc_6442


It looks like the Windows carriage returns are messing up the parsing of the conf file. I copied your conf files into $
QNX_HOST/etc/icc/10.1.011 and then removed all the carriage returns by doing

$ cd QNX_HOST/etc/qcc/icc./10.1.011
$ for file in *.conf; do sed -e "s/\r//g" $file >$file.fix; mv $file.fix $file; done

Since I don't have the icc binaries, I confirmed the conf files are working but using the qcc option -n (do not execute)
 in combination with -v to see how qcc was invoking icc 

$ qcc -V10.1.011,icc_ntox86 t.c -v -n
cc: looking for icc_ntox86 in /opt/qnx630/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86++.conf
cc: looking for icc_ntox86 in /opt/qnx630/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86.conf
/opt/intel/cc/10.1.011/bin/icc -S t.c -o /tmp/file6l90nx_qcc_30886/t.s
/opt/intel/cc/10.1.011/bin/icc -c /tmp/file6l90nx_qcc_30886/t.s -o /tmp/file6l90nx_qcc_30886/t.o
/opt/intel/cc/10.1.011/bin/icc /tmp/file6l90nx_qcc_30886/t.o -o a.out
cc: unlinking /tmp/file6l90nx_qcc_30886/t.s
cc: unlinking /tmp/file6l90nx_qcc_30886/t.o
cc: removing  /tmp/file6l90nx_qcc_30886

I noticed in your conf files you had hardcoded the path to the icc binary as /opt/intel/cc/10.1.011/bin/icc. Will the 
installation always be at this location or are you going to change the confiles to have $IA32ROOT/bin/icc or something 
similar?

Regards,

Ryan Mansfield
RE: add new compiler under QNX Momentics IDE  
Ryan,
	Thanks for the finding. I expanded my variable to avoid any
potential syntax issue. Now, I'm able to see the ICC from the QNX IDE.

Larry


-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Thursday, February 28, 2008 10:23 AM
To: momentics-community
Subject: Re: add new compiler under QNX Momentics IDE

> root@ubuntu01:/opt/qnx632/host/linux/x86/usr/bin# ./qcc
-V10.1.011,icc_ntox86 
> t.c -v
> cc: looking for icc_ntox86 in
/opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/
> icc_ntox86++.conf
> cc: looking for icc_ntox86 in
/opt/qnx632/host/linux/x86/etc/qcc/icc/10.1.011/
> icc_ntox86.conf
>  t.c -o /tmp/file87ThrQ_qcc_6442/t.s
>  failed: No such file or directory/bin/icc
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
> cc: removing  /tmp/file87ThrQ_qcc_6442
>  error 1/intel/cc/10.1.011/bin/icc
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.s
> cc: unlinking /tmp/file87ThrQ_qcc_6442/t.o
> cc: removing  /tmp/file87ThrQ_qcc_6442


It looks like the Windows carriage returns are messing up the parsing of
the conf file. I copied your conf files into $QNX_HOST/etc/icc/10.1.011
and then removed all the carriage returns by doing

$ cd QNX_HOST/etc/qcc/icc./10.1.011
$ for file in *.conf; do sed -e "s/\r//g" $file >$file.fix; mv $file.fix
$file; done

Since I don't have the icc binaries, I confirmed the conf files are
working but using the qcc option -n (do not execute) in combination with
-v to see how qcc was invoking icc 

$ qcc -V10.1.011,icc_ntox86 t.c -v -n
cc: looking for icc_ntox86 in
/opt/qnx630/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86++.conf
cc: looking for icc_ntox86 in
/opt/qnx630/host/linux/x86/etc/qcc/icc/10.1.011/icc_ntox86.conf
/opt/intel/cc/10.1.011/bin/icc -S t.c -o /tmp/file6l90nx_qcc_30886/t.s
/opt/intel/cc/10.1.011/bin/icc -c /tmp/file6l90nx_qcc_30886/t.s -o
/tmp/file6l90nx_qcc_30886/t.o
/opt/intel/cc/10.1.011/bin/icc /tmp/file6l90nx_qcc_30886/t.o -o a.out
cc: unlinking /tmp/file6l90nx_qcc_30886/t.s
cc: unlinking /tmp/file6l90nx_qcc_30886/t.o
cc: removing  /tmp/file6l90nx_qcc_30886

I noticed in your conf files you had hardcoded the path to the icc
binary as /opt/intel/cc/10.1.011/bin/icc. Will the installation always
be at this location or are you going to change the confiles to have
$IA32ROOT/bin/icc or something similar?

Regards,

Ryan Mansfield

_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5372
Re: RE: add new compiler under QNX Momentics IDE  
> Ryan,
> 	Thanks for the finding. I expanded my variable to avoid any
> potential syntax issue. Now, I'm able to see the ICC from the QNX IDE.

That's good news. Please let me know if you encounter any other issues.

Regards,

Ryan Mansfield
RE: RE: add new compiler under QNX Momentics IDE  
Ryan,
	This is about how to add additional switch into the conf files.
I am able to do cross-compiling (icc compiling, gcc for linking) through
two .cfg files (icc.cfg.qnx and icpc.cfg.qnx) under icc/10.1.011/bin
directory. How could I integrate these configuration parameters (a
couple of -D switches) into the conf files under gcc/icc/10.1.011
directory?

Larry
 

-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Thursday, February 28, 2008 10:56 AM
To: momentics-community
Subject: Re: RE: add new compiler under QNX Momentics IDE

> Ryan,
> 	Thanks for the finding. I expanded my variable to avoid any
> potential syntax issue. Now, I'm able to see the ICC from the QNX IDE.

That's good news. Please let me know if you encounter any other issues.

Regards,

Ryan Mansfield

_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5374
Re: RE: RE: add new compiler under QNX Momentics IDE  
> Ryan,
> 	This is about how to add additional switch into the conf files.
> I am able to do cross-compiling (icc compiling, gcc for linking) through
> two .cfg files (icc.cfg.qnx and icpc.cfg.qnx) under icc/10.1.011/bin
> directory. How could I integrate these configuration parameters (a
> couple of -D switches) into the conf files under gcc/icc/10.1.011
> directory?

The conf files have a way to provide a set of options for each stage of the compilation. The conf file convention is <
stage>_opt=<options>.
If you need to specify -D macros, the should be specified at the preprocessor stage (cpp) and the compilation stage (cc)
.

We define -D macros in our qcc conf files for gcc. For example:

        cc=cc1

        cc_opt=-quiet -p   -nostdinc -D__LANGUAGE_C -D_LANGUAGE_C \
        -D__QNX__ -D__QNXNTO__ \
        "-D__GNUC__=4" "-D__GNUC_MINOR__=2" "-D__GNUC_PATCHLEVEL__=1" \
        -D__unix__ -D__unix -D__ELF__ \
        -D__X86__ -D__i386__ \
        -D__LITTLEENDIAN__

Regards,

Ryan Mansfield
RE: RE: RE: add new compiler under QNX Momentics IDE  
I updated my conf files so that I could compile a simple .cc file
through qcc and conf files, but when I ran it through Momentics IDE, it
failed. From the output, it doesn't pickup the cc_opt from my conf
files.

The enclosed are output from both IDE and terminal mode.

Larry


-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Thursday, February 28, 2008 12:32 PM
To: momentics-community
Subject: Re: RE: RE: add new compiler under QNX Momentics IDE

> Ryan,
> 	This is about how to add additional switch into the conf files.
> I am able to do cross-compiling (icc compiling, gcc for linking)
through
> two .cfg files (icc.cfg.qnx and icpc.cfg.qnx) under icc/10.1.011/bin
> directory. How could I integrate these configuration parameters (a
> couple of -D switches) into the conf files under gcc/icc/10.1.011
> directory?

The conf files have a way to provide a set of options for each stage of
the compilation. The conf file convention is <stage>_opt=<options>.
If you need to specify -D macros, the should be specified at the
preprocessor stage (cpp) and the compilation stage (cc).

We define -D macros in our qcc conf files for gcc. For example:

        cc=cc1

        cc_opt=-quiet -p   -nostdinc -D__LANGUAGE_C -D_LANGUAGE_C \
        -D__QNX__ -D__QNXNTO__ \
        "-D__GNUC__=4" "-D__GNUC_MINOR__=2" "-D__GNUC_PATCHLEVEL__=1" \
        -D__unix__ -D__unix -D__ELF__ \
        -D__X86__ -D__i386__ \
        -D__LITTLEENDIAN__

Regards,

Ryan Mansfield

_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5379

Attachment: Text build_error.txt 3.03 KB
Re: RE: RE: RE: add new compiler under QNX Momentics IDE  
> I updated my conf files so that I could compile a simple .cc file
> through qcc and conf files, but when I ran it through Momentics IDE, it
> failed. From the output, it doesn't pickup the cc_opt from my conf
> files.

The reason the options are not being picked up from within the IDE is that under the IDE you have created a QNX project 
that uses QNX recursive makefiles. Since in the past we never had Linux host support for the ICC compiler before, our 
Linux host mkfiles do not use qcc as the compiler driver, and end up trying to call the icc driver directly. You can see
 icc being directly invoked in the log you posted.

I've attached a qconf-linux.mk file which will have the recursive mkfiles call qcc -Vicc_ntox86 instead of icc directly.
 Please copy this file into $QNX_TARGET/usr/include/mk.

Regards,

Ryan Mansfield
Attachment: Text qconf-linux.mk 8.56 KB
RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
Now, I got new error. The enclosed file includes the latest error
messages and message from last trial.

Larry


-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 10:33 AM
To: momentics-community
Subject: Re: RE: RE: RE: add new compiler under QNX Momentics IDE

> I updated my conf files so that I could compile a simple .cc file
> through qcc and conf files, but when I ran it through Momentics IDE,
it
> failed. From the output, it doesn't pickup the cc_opt from my conf
> files.

The reason the options are not being picked up from within the IDE is
that under the IDE you have created a QNX project that uses QNX
recursive makefiles. Since in the past we never had Linux host support
for the ICC compiler before, our Linux host mkfiles do not use qcc as
the compiler driver, and end up trying to call the icc driver directly.
You can see icc being directly invoked in the log you posted.

I've attached a qconf-linux.mk file which will have the recursive
mkfiles call qcc -Vicc_ntox86 instead of icc directly. Please copy this
file into $QNX_TARGET/usr/include/mk.

Regards,

Ryan Mansfield


_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5408
Attachment: Text build_error.txt 5.12 KB
Re: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
> Now, I got new error. The enclosed file includes the latest error
> messages and message from last trial.
> 
> Larry

Your missing a conf file for qcc to tell qcc which is the default version of icc to use.

Add a file $QNX_HOST/etc/qcc/icc/default with the contents:

DIR=10.1.0.11

This will allow qcc -Vicc_ntox86 to point to the 10.1.011 conf files.

Regards,

Ryan Mansfield
Re: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
Er, I meant DIR=10.1.011. Sorry.

Regards,

Ryan Mansfield
RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
Now, I got linker error. Somehow, the IDE still tried to link with gcc
library. How could I change so the IDE won't pick up library from gcc?
BTW, I also need to link the object with one of the icc/lib file. Could
you tell me which variable to change?

My last question is that I tested the command mode the other day on
using qcc to link object files generated from icc. I observed the
following:

<working> qcc -o foo foo.o -L<some libarary> -l<libray file>
<not working> qcc -L<some libarary> -l<libray file> -o foo foo.o 

The only difference is the order of switch.

Larry


-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 2:39 PM
To: momentics-community
Subject: Re: RE: RE: RE: RE: add new compiler under QNX Momentics IDE

Er, I meant DIR=10.1.011. Sorry.

Regards,

Ryan Mansfield

_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5427

Attachment: Text linker_error 9.5 KB
Re: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
> Now, I got linker error. Somehow, the IDE still tried to link with gcc
> library. How could I change so the IDE won't pick up library from gcc?
> BTW, I also need to link the object with one of the icc/lib file. Could
> you tell me which variable to change?

Can you send me the output if you specify -v and -Wl,-v? I thought in 8.1, the icpc driver handled all the lib dirs -L 
and not qcc.

For example:

qcc -V8.1,icc_ntox86 t.cc -v

<snip>

C:\Intel\Compiler81\EIA\/bin/icpc.exe -v C:\DOCUME~1\RMANSF~1\LOCALS~1\Temp\4qcc
klTOja\t.o -o a.out
8.1
C:\QNX630\host\win32\x86/usr/bin\ntox86-ld    C:\QNX630\target\qnx6/x86/lib\crt1
.o C:\QNX630\target\qnx6/x86/lib\crti.o C:\Intel\Compiler81\EIA\/lib\crtxi.o -dy namic-linker /usr/lib/ldqnx.so.2 -b 
elf32-i386 -m i386nto -o a.out C:\DOCUME~1\R
MANSF~1\LOCALS~1\Temp\4qccklTOja\t.o -Qy -LC:\Intel\Compiler81\EIA\/lib -LC:\QNX
630\target\qnx6/x86/lib -lc -Bstatic -limf -Bdynamic -lm -lcprts -lcxa -Bstatic
-lirc -Bdynamic -lunwind -lc -Bstatic -lc -Bdynamic -Bstatic -lirc_s C:\Intel\Co
mpiler81\EIA\/lib\crtxn.o C:\QNX630\target\qnx6/x86/lib\crtn.o

> My last question is that I tested the command mode the other day on
> using qcc to link object files generated from icc. I observed the
> following:
> 
> <working> qcc -o foo foo.o -L<some libarary> -l<libray file>
> <not working> qcc -L<some libarary> -l<libray file> -o foo foo.o 

That's how the GNU linker works. The linker only maintains a list of undefined symbols going left to right on the link 
line. If your library appears before the reference on the link line, the linker does not go back and scan libraries 
already encountered unless you use the --start-group and --end-group options offered by ld.

Regards,

Ryan Mansfield

> -----Original Message-----
> From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
> Sent: Friday, February 29, 2008 2:39 PM
> To: momentics-community
> Subject: Re: RE: RE: RE: RE: add new compiler under QNX Momentics IDE
> 
> Er, I meant DIR=10.1.011. Sorry.
> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post5427
> 


RE: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  

-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 3:41 PM
To: momentics-community
Subject: Re: RE: RE: RE: RE: RE: add new compiler under QNX Momentics
IDE

> Now, I got linker error. Somehow, the IDE still tried to link with gcc
> library. How could I change so the IDE won't pick up library from gcc?
> BTW, I also need to link the object with one of the icc/lib file.
Could
> you tell me which variable to change?

Can you send me the output if you specify -v and -Wl,-v? I thought in
8.1, the icpc driver handled all the lib dirs -L and not qcc.

For example:

qcc -V8.1,icc_ntox86 t.cc -v

<snip>

C:\Intel\Compiler81\EIA\/bin/icpc.exe -v
C:\DOCUME~1\RMANSF~1\LOCALS~1\Temp\4qcc
klTOja\t.o -o a.out
8.1
C:\QNX630\host\win32\x86/usr/bin\ntox86-ld
C:\QNX630\target\qnx6/x86/lib\crt1
.o C:\QNX630\target\qnx6/x86/lib\crti.o
C:\Intel\Compiler81\EIA\/lib\crtxi.o -dy namic-linker
/usr/lib/ldqnx.so.2 -b elf32-i386 -m i386nto -o a.out C:\DOCUME~1\R
MANSF~1\LOCALS~1\Temp\4qccklTOja\t.o -Qy -LC:\Intel\Compiler81\EIA\/lib
-LC:\QNX
630\target\qnx6/x86/lib -lc -Bstatic -limf -Bdynamic -lm -lcprts -lcxa
-Bstatic
-lirc -Bdynamic -lunwind -lc -Bstatic -lc -Bdynamic -Bstatic -lirc_s
C:\Intel\Co
mpiler81\EIA\/lib\crtxn.o C:\QNX630\target\qnx6/x86/lib\crtn.o

> My last question is that I tested the command mode the other day on
> using qcc to link object files generated from icc. I observed the
> following:
> 
> <working> qcc -o foo foo.o -L<some libarary> -l<libray file>
> <not working> qcc -L<some libarary> -l<libray file> -o foo foo.o 

That's how the GNU linker works. The linker only maintains a list of
undefined symbols going left to right on the link line. If your library
appears before the reference on the link line, the linker does not go
back and scan libraries already encountered unless you use the
--start-group and --end-group options offered by ld.

Regards,

Ryan Mansfield

> -----Original Message-----
> From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
> Sent: Friday, February 29, 2008 2:39 PM
> To: momentics-community
> Subject: Re: RE: RE: RE: RE: add new compiler under QNX Momentics IDE
> 
> Er, I meant DIR=10.1.011. Sorry.
> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post5427
> 




_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5433

Attachment: Text linker_error 13.15 KB
Re: RE: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
This isn't a configuration issue with qcc but with icc. It looks like the icc driver is been configured to as a native 
compiler and not a cross compiler. It is calling the native linux ld with -L paths to the Linux libs.

From your log: 

This is what qcc calls:

icc /tmp/filefs7nlI_qcc_9370/hello.o -v -o a.out

And this is what icc in turn calls:

/opt/intel/cc/10.1.011/bin/mcpcom    -mP1OPT_version=1010 -mP1OPT_print_version=
FALSE -mP3OPT_use_mspp_call_convention -mCG_use_gas_got_workaround=T "-mGLOB_opt
ions_string=-v -o a.out" -mGLOB_cxx_limited_range=FALSE -mP2OPT_eh_nirvana -mGLO
B_diag_file=/tmp/filefs7nlI_qcc_9370/hello.diag -mGLOB_as_output_backup_file_nam
e=/tmp/iccyv5Ywwas_.s -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE -mGLOB_f
p_speculation=GLOB_FP_SPECULATION_FAST -mIPOPT_ninl_user_level=2 -mIPOPT_activat
e -mP2OPT_hlo -mPAROPT_par_report=1 -mCG_emit_as_seg_grouping -mIPOPT_link -mIPO
PT_ipo_activate -mIPOPT_ipo_mo_activate -mIPOPT_ipo_mo_nfiles=1 -mIPOPT_source_f
iles_list=/tmp/iccTNkVN6lst -mIPOPT_short_data_info=/tmp/iccOQguJXsdata -mIPOPT_
link_script_file=/tmp/iccdos3EOscript -mIPOPT_global_data "-mIPOPT_link_version=
(GNU Binutils for Ubuntu) 2.18" "-mIPOPT_cmdline_link="/usr/lib/gcc/i486-linux-g
nu/4.1.3/../../../crt1.o" "/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o" "/
usr/lib/gcc/i486-linux-gnu/4.1.3/crtbegin.o" "--eh-frame-hdr" "-dynamic-linker"
"/lib/ld-linux.so.2" "-m" "elf_i386" "-o" "a.out" "/tmp/filefs7nlI_qcc_9370/hell
o.o" "-L/opt/intel/cc/10.1.011/lib" "-L/usr/lib/gcc/i486-linux-gnu/4.1.3/" "-L/u
sr/lib/gcc/i486-linux-gnu/4.1.3/../../../" "-Bstatic" "-limf" "-Bdynamic" "-lm"
"-Bstatic" "-lipgo" "-Bdynamic" "-lgcc_s" "-lgcc" "-Bstatic" "-lirc" "-Bdynamic"
 "-lc" "-lgcc_s" "-lgcc" "-Bstatic" "-lirc_s" "-Bdynamic" "-ldl" "-lc" "/usr/lib
/gcc/i486-linux-gnu/4.1.3/crtend.o" "/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../
crtn.o"" -mIPOPT_save_il0 -mIPOPT_il_in_obj -mIPOPT_ipo_activate_warn=FALSE -mIP
OPT_obj_output_file_name=/tmp/ipo_iccYfwf1x.o "-mGLOB_linker_version=(GNU Binuti
ls for Ubuntu) 2.18" -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_obj_output_f
ile=/tmp/ipo_iccYfwf1x.o -mP1OPT_source_file_name=/tmp/ipo_iccYfwf1x.c /tmp/file
fs7nlI_qcc_9370/hello.o -mIPOPT_object_files=/tmp/iccBCUNWotxt -mIPOPT_cmdline_l
ink_new=/tmp/iccS7umSftxt
ld    --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o a.out -L/
opt/intel/cc/10.1.011/lib -L/usr/lib/gcc/i486-linux-gnu/4.1.3/ -L/usr/lib/gcc/i4
86-linux-gnu/4.1.3/../../../ /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crt1.o /
usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o /usr/lib/gcc/i486-linux-gnu/4.1
.3/crtbegin.o /tmp/filefs7nlI_qcc_9370/hello.o -Bstatic -limf -Bdynamic -lm -Bst
atic -lipgo -Bdynamic -lgcc_s -lgcc -Bstatic -lirc -Bdynamic -lc -lgcc_s -lgcc -
Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/i486-linux-gnu/4.1.3/crtend.o /u
sr/lib/gcc/i486-linux-gnu/4.1.3/../../../crtn.o
ld    --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o a.out -L/
opt/intel/cc/10.1.011/lib -L/usr/lib/gcc/i486-linux-gnu/4.1.3/ -L/usr/lib/gcc/i4
86-linux-gnu/4.1.3/../../../ /usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crt1.o /
usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o /usr/lib/gcc/i486-linux-gnu/4.1
.3/crtbegin.o /tmp/filefs7nlI_qcc_9370/hello.o -Bstatic -limf -Bdynamic -lm -Bst
atic -lipgo -Bdynamic -lgcc_s -lgcc -Bstatic -lirc -Bdynamic -lc -lgcc_s -lgcc -
Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/i486-linux-gnu/4.1.3/crtend.o /u
sr/lib/gcc/i486-linux-gnu/4.1.3/../../../crtn.o

As far as I know, the configuration of how icc invokes mcpcom and ld is internal to the icc binary.

Regards,

Ryan Mansfield
RE: RE: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
For the linking process, how could I have qcc do the linking instead of
invoking icc, such as the example that I send it to you:

qcc -o foo foo.o -L<some libarary> -l<libray file>

-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 4:46 PM
To: momentics-community
Subject: Re: RE: RE: RE: RE: RE: RE: add new compiler under QNX
Momentics IDE

This isn't a configuration issue with qcc but with icc. It looks like
the icc driver is been configured to as a native compiler and not a
cross compiler. It is calling the native linux ld with -L paths to the
Linux libs.

From your log: 

This is what qcc calls:

icc /tmp/filefs7nlI_qcc_9370/hello.o -v -o a.out

And this is what icc in turn calls:

/opt/intel/cc/10.1.011/bin/mcpcom    -mP1OPT_version=1010
-mP1OPT_print_version=
FALSE -mP3OPT_use_mspp_call_convention -mCG_use_gas_got_workaround=T
"-mGLOB_opt
ions_string=-v -o a.out" -mGLOB_cxx_limited_range=FALSE
-mP2OPT_eh_nirvana -mGLO
B_diag_file=/tmp/filefs7nlI_qcc_9370/hello.diag
-mGLOB_as_output_backup_file_nam
e=/tmp/iccyv5Ywwas_.s -mGLOB_machine_model=GLOB_MACHINE_MODEL_IA32_NONE
-mGLOB_f
p_speculation=GLOB_FP_SPECULATION_FAST -mIPOPT_ninl_user_level=2
-mIPOPT_activat
e -mP2OPT_hlo -mPAROPT_par_report=1 -mCG_emit_as_seg_grouping
-mIPOPT_link -mIPO
PT_ipo_activate -mIPOPT_ipo_mo_activate -mIPOPT_ipo_mo_nfiles=1
-mIPOPT_source_f
iles_list=/tmp/iccTNkVN6lst -mIPOPT_short_data_info=/tmp/iccOQguJXsdata
-mIPOPT_
link_script_file=/tmp/iccdos3EOscript -mIPOPT_global_data
"-mIPOPT_link_version=
(GNU Binutils for Ubuntu) 2.18"
"-mIPOPT_cmdline_link="/usr/lib/gcc/i486-linux-g
nu/4.1.3/../../../crt1.o"
"/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o" "/
usr/lib/gcc/i486-linux-gnu/4.1.3/crtbegin.o" "--eh-frame-hdr"
"-dynamic-linker"
"/lib/ld-linux.so.2" "-m" "elf_i386" "-o" "a.out"
"/tmp/filefs7nlI_qcc_9370/hell
o.o" "-L/opt/intel/cc/10.1.011/lib"
"-L/usr/lib/gcc/i486-linux-gnu/4.1.3/" "-L/u
sr/lib/gcc/i486-linux-gnu/4.1.3/../../../" "-Bstatic" "-limf"
"-Bdynamic" "-lm"
"-Bstatic" "-lipgo" "-Bdynamic" "-lgcc_s" "-lgcc" "-Bstatic" "-lirc"
"-Bdynamic"
 "-lc" "-lgcc_s" "-lgcc" "-Bstatic" "-lirc_s" "-Bdynamic" "-ldl" "-lc"
"/usr/lib
/gcc/i486-linux-gnu/4.1.3/crtend.o"
"/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../
crtn.o"" -mIPOPT_save_il0 -mIPOPT_il_in_obj
-mIPOPT_ipo_activate_warn=FALSE -mIP
OPT_obj_output_file_name=/tmp/ipo_iccYfwf1x.o
"-mGLOB_linker_version=(GNU Binuti
ls for Ubuntu) 2.18" -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS
-mGLOB_obj_output_f
ile=/tmp/ipo_iccYfwf1x.o -mP1OPT_source_file_name=/tmp/ipo_iccYfwf1x.c
/tmp/file
fs7nlI_qcc_9370/hello.o -mIPOPT_object_files=/tmp/iccBCUNWotxt
-mIPOPT_cmdline_l
ink_new=/tmp/iccS7umSftxt
ld    --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o
a.out -L/
opt/intel/cc/10.1.011/lib -L/usr/lib/gcc/i486-linux-gnu/4.1.3/
-L/usr/lib/gcc/i4
86-linux-gnu/4.1.3/../../../
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crt1.o /
usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o
/usr/lib/gcc/i486-linux-gnu/4.1
.3/crtbegin.o /tmp/filefs7nlI_qcc_9370/hello.o -Bstatic -limf -Bdynamic
-lm -Bst
atic -lipgo -Bdynamic -lgcc_s -lgcc -Bstatic -lirc -Bdynamic -lc -lgcc_s
-lgcc -
Bstatic -lirc_s -Bdynamic -ldl -lc
/usr/lib/gcc/i486-linux-gnu/4.1.3/crtend.o /u
sr/lib/gcc/i486-linux-gnu/4.1.3/../../../crtn.o
ld    --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o
a.out -L/
opt/intel/cc/10.1.011/lib -L/usr/lib/gcc/i486-linux-gnu/4.1.3/
-L/usr/lib/gcc/i4
86-linux-gnu/4.1.3/../../../
/usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crt1.o /
usr/lib/gcc/i486-linux-gnu/4.1.3/../../../crti.o
/usr/lib/gcc/i486-linux-gnu/4.1
.3/crtbegin.o /tmp/filefs7nlI_qcc_9370/hello.o -Bstatic -limf -Bdynamic
-lm -Bst
atic -lipgo -Bdynamic -lgcc_s -lgcc -Bstatic -lirc -Bdynamic -lc -lgcc_s
-lgcc -
Bstatic -lirc_s -Bdynamic -ldl...
View Full Message
Re: RE: RE: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
> For the linking process, how could I have qcc do the linking instead of
> invoking icc, such as the example that I send it to you:
> 
> qcc -o foo foo.o -L<some libarary> -l<libray file>

Well you execute this, you're invoking the qcc conf files for gcc, so have a look at how the linker is invoked by qcc in
 the gcc conf files. $QNX_HOST/etc/qcc/gcc/3.3.5/gcc_ntox86.conf

You'll want to look at the parts for ld, ld_opt, ld_stdlib_path, ld_* parts in the conf files.You'll have to change ld 
to ntox86-ld, and then the ld_* opts to point to our lib dirs and then add in the icc libs.

From your output, its looks as if the compiler is actually a native Linux compiler, and you just want to link native 
Linux objects against QNX startup and libs -- which could work. But doesn't ICC for Linux have builtin include search 
paths, builtin defines, etc, that are specific to Linux? Is the mcpcom step before ld not necessary?  I'm curious why 
it's been implemented this way instead of how ICC 8.1 was done.

Regards,

Ryan Mansfield
RE: RE: RE: RE: RE: RE: RE: RE: add new compiler under QNX Momentics IDE  
Thanks!

Larry


-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 5:57 PM
To: momentics-community
Subject: Re: RE: RE: RE: RE: RE: RE: RE: add new compiler under QNX
Momentics IDE

> For the linking process, how could I have qcc do the linking instead
of
> invoking icc, such as the example that I send it to you:
> 
> qcc -o foo foo.o -L<some libarary> -l<libray file>

Well you execute this, you're invoking the qcc conf files for gcc, so
have a look at how the linker is invoked by qcc in the gcc conf files.
$QNX_HOST/etc/qcc/gcc/3.3.5/gcc_ntox86.conf

You'll want to look at the parts for ld, ld_opt, ld_stdlib_path, ld_*
parts in the conf files.You'll have to change ld to ntox86-ld, and then
the ld_* opts to point to our lib dirs and then add in the icc libs.

From your output, its looks as if the compiler is actually a native
Linux compiler, and you just want to link native Linux objects against
QNX startup and libs -- which could work. But doesn't ICC for Linux have
builtin include search paths, builtin defines, etc, that are specific to
Linux? Is the mcpcom step before ld not necessary?  I'm curious why it's
been implemented this way instead of how ICC 8.1 was done.

Regards,

Ryan Mansfield


_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5439
naming convention for window  
Hello Ryan,
	Since the subject is related to collaboration between QNX and
Intel, I prefer to discuss with you through company e-mail instead of
posting to the forums over QNX website. Please let me if this is an
issue.
	My new problem with QNX IDE is that I'm working on integrating a
couple of Window libraries (I assumed it's PE format) into QNX through
Momentics IDE. I got the following error messages while qcc intends to
link (I choose the GCC 3.2 as the compiler).

-oC:/QNX632/ide4-workspace/smoke_test/x86/o/smoke_test    smoke_test.o
-L. -LC:/opt/Intel/IPP/5.3.1.064/ia32/lib
-LC:/QNX632/target/qnx6/x86/lib/gcc/3.3.5
-LC:/QNX632/target/qnx6/x86/lib -LC:/QNX632/target/qnx6/x86/usr/lib
-Bstatic    -lC:/opt/Intel/IPP/5.3.1.064/ia32/lib/ippsemerged.lib
-lc:/opt/Intel/IPP/5.3.1.064/ia32/lib/ippsmerged.lib    -Bdynamic     
/cygdrive/c/QNX632/host/win32/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld:
cannot find -lC:/opt/Intel/IPP/5.3.1.064/ia32/lib/ippsemerged.lib
cc: C:/QNX632/host/win32/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld caught
signal 1
make[2]: *** [C:/QNX632/ide4-workspace/smoke_test/x86/o/smoke_test]
Error 1
make[2]: Target `all' not remade because of errors.
make[2]: Leaving directory `C:/QNX632/ide4-workspace/smoke_test/x86/o'
make -j 1 -Co-g -fMakefile all
make[1]: [all] Error 2 (ignored)

	It looks to me that the IDE still uses the Linux library
convention (lib<library-name>). Does that mean I need to port my Linux
version of library here, instead of Windows? The other issue that I
found that over IDE GUI, I am supposed to be able to specify additional
library/include path, but the IDE won't accept any path string that has
<SPACE> in. Even that I tried to use an environment variable, once the
IDE expands the environment variables it creates two path strings when
it sees a <SPACE>.

Larry

-----Original Message-----
From: Ryan Mansfield [mailto:rmansfield@qnx.com] 
Sent: Friday, February 29, 2008 5:57 PM
To: momentics-community
Subject: Re: RE: RE: RE: RE: RE: RE: RE: add new compiler under QNX
Momentics IDE

> For the linking process, how could I have qcc do the linking instead
of
> invoking icc, such as the example that I send it to you:
> 
> qcc -o foo foo.o -L<some libarary> -l<libray file>

Well you execute this, you're invoking the qcc conf files for gcc, so
have a look at how the linker is invoked by qcc in the gcc conf files.
$QNX_HOST/etc/qcc/gcc/3.3.5/gcc_ntox86.conf

You'll want to look at the parts for ld, ld_opt, ld_stdlib_path, ld_*
parts in the conf files.You'll have to change ld to ntox86-ld, and then
the ld_* opts to point to our lib dirs and then add in the icc libs.

From your output, its looks as if the compiler is actually a native
Linux compiler, and you just want to link native Linux objects against
QNX startup and libs -- which could work. But doesn't ICC for Linux have
builtin include search paths, builtin defines, etc, that are specific to
Linux? Is the mcpcom step before ld not necessary?  I'm curious why it's
been implemented this way instead of how ICC 8.1 was done.

Regards,

Ryan Mansfield


_______________________________________________
QNX Momentics Community Support
http://community.qnx.com/sf/go/post5439
Re: naming convention for window  
> Hello Ryan,
> 	Since the subject is related to collaboration between QNX and
> Intel, I prefer to discuss with you through company e-mail instead of
> posting to the forums over QNX website. Please let me if this is an
> issue.
> 	My new problem with QNX IDE is that I'm working on integrating a
> couple of Window libraries (I assumed it's PE format) into QNX through
> Momentics IDE. I got the following error messages while qcc intends to
> link (I choose the GCC 3.2 as the compiler).

Hello Larry,

If you need to discuss anything sensitive that cannot be discussed on the forums, you can email me privately at 
rmansfield@qnx.com. If there's general questions about qcc or IDE integration that can be publicly discussed, we'd 
really like to do it on the Foundry so the information is available for others to learn.

You won't be able to link and execute PE libraries into QNX. We only support ELF binaries on Neutrino. If you're trying 
to link in any libraries to run on QNX, they should be built with a cross compiler (gcc or icc) that specifically 
targets QNX. 

I believe the spaces in the include paths are a known issue. I'll do some investigation and get back to you.

Regards,

Ryan Mansfield