Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353786

Summary: C/C++ GCC Cross Compiler support for static libraries broken
Product: [Tools] CDT Reporter: AK <kirsche40>
Component: cdt-buildAssignee: Marc-André Laperle <malaperle>
Status: RESOLVED FIXED QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: major    
Priority: P3 CC: cdtdoug, malaperle, yevshif
Version: 8.0   
Target Milestone: 8.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 353719    

Description AK CLA 2011-08-03 11:30:06 EDT
Build Identifier: 20110615-0604

I am using ELDK 3.0 as cross toolchain under Ubuntu 8.04. If I try to generate a static library with a Cross Compiler Toolchain the project contains wrong and not changeable paths to local plattform includes instead of cross toolchain includes. Also the gcc archiver is not part of the cross toolchain. Both errors seem to have the same cause. In this case using a Cross Compiler Toolchain is impossible. Seems for me to be a blocking error.

Reproducible: Always

Steps to Reproduce:
1. New --> C++ Project
2. Static Library --> Empty project --> Cross GCC
3. Finish
4. Look into project properties in new generated project
5. C/C++ General --> Paths and Symbols --> Includes --> GNU C++
6. See wrong paths like "/usr/include/c++/4.2" which is not changeable

Second issue:
7. project properties --> C/C++ Build --> settings
8. no archiver and no assembler available

Third issue:
9. project properties --> C/C++ Build --> Tool Chain Editor
10. no Cross Archiver available
Comment 1 Marc-André Laperle CLA 2011-08-03 13:16:43 EDT
This was fixed in bug 344009. You can update to a more recent build here:
https://hudson.eclipse.org/hudson/job/cdt-release/

For the includes problems, try the steps in bug 353719 comment 7 .

*** This bug has been marked as a duplicate of bug 344009 ***
Comment 2 AK CLA 2011-08-04 04:26:03 EDT
How do I have to install this Pre-release? If I remember correctly I will not get any further autommatic CDT update if I copy this to my eclipse plugins directory. Is this correct?

Next is off topic but only my humble opinion. Saying "use a pre-Release" does not solve anything. CDT 8 should never have been released with such serious issue. CDT 8.0.0 seems to be an untested alpha release because it was never feature complete. CDT 8.0.0 should be revoked (which is impossible) or fixed in 8.0.1. The latter should come out as soon as possible but not as late as announced for 2011-09-23.
Comment 3 AK CLA 2011-08-04 06:53:42 EDT
This bug is still not fixed completely by patch for bug 344009.

I followed the instruction found after some investigations on http://wiki.eclipse.org/CDT/User/DownloadCDTLatest and installed the new nightly build #133. If I create a crossGCC static library project I am not asked for tools prefix and path to my cross tool chain. I have to go into the project setting and do this after creation. Seems to be an open issue inside project wizard.
Comment 4 Marc-André Laperle CLA 2012-01-28 16:16:49 EST
A fix has been applied to 8.0.2 (see Bug 353890)

1. New --> C++ Project
2. Static Library --> Cross-compile Project

The prefix and path will now be asked. I'll keep this opened until it's fixed on the master branch (CDT 9).
Comment 5 CDT Genie CLA 2012-02-29 13:23:30 EST
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 353890 - C/C++ GCC Cross Compiler support for dynamic libraries is
    broken
    Bug 353786 - C/C++ GCC Cross Compiler support for static libraries
    broken

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=00300a355eb2ffda1b14eccb50b3d47e1cb03ddf
Comment 6 Marc-André Laperle CLA 2012-04-28 15:30:54 EDT
Fix applied to master (8.1). See bug 353890 comment 11 for more detail.
Comment 7 CDT Genie CLA 2013-02-27 11:40:53 EST
*** cdt git genie on behalf of Marc-Andre Laperle ***

    Bug 353786 - Bug 353890 Convert Cross compile template to a custom page

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=8b7660f83b255bbbd4f99409c77010244802da96