Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] problem creating a custom toolchain`s linker

I think you are completely confused. What you want is something like this:
<configuration
         artifactExtension="exe"
...

This tells the build system that your linker is going to create a file with an .exe extension.

On 10 Jan 2013, at 08:02, Tamas Csabina <t.csabina@xxxxxxxxx> wrote:

Hello Derek,
 
 
I figured out that as I copied the org.eclipse.cdt.managebuilder.gnu.ui plugin I do have artifactExtension properties under the <configuration>. However I am a bit confused about how to use it.
The org.eclipse.cdt.managebuilder.gnu.ui plugin`s configuration (cdt.managedbuild.config.gnu.base) uses 2 artifactExtension properties:
<enablement type="CONTAINER_ATTRIBUTE"
  attribute="artifactExtension"
  value="so"
  extensionAdjustment="false">
  <checkBuildProperty
    property="org.eclipse.cdt.build.core.buildArtefactType"
    value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
</enablement>
<enablement type="CONTAINER_ATTRIBUTE"
  attribute="artifactExtension"
  value="a"
  extensionAdjustment="false">
  <checkBuildProperty
    property="org.eclipse.cdt.build.core.buildArtefactType"
    value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
</enablement>

These (so and a) seems to me linux library extensions, so I guess this is not the one that should create the target exe.
Furthermore org.eclipse.cdt.managebuilder.gnu.ui plugin has a projectType (cdt.managedbuild.target.gnu.exe), where the buildArtefactType property is defined as org.eclipse.cdt.build.core.buildArtefactType.exe. I don`t see anywhere else org.eclipse.cdt.build.core.buildArtefactType.exe as defined type, so I guess this means that when the target platform is win32 (and cdt.managedbuild.target.gnu.exe used as projectType), the org.eclipse.cdt.managebuilder.gnu.ui plugin will use cdt.managedbuild.target.gnu.exe`s buildArtefactType to create an exe, instead of using the base configuration`s (cdt.managedbuild.config.gnu.base) buildArtefacType to create so or a.
 
If this assumption is correct, I only have to define the buildArtefactType in my <projectType>, and no need to have an artifactExtension under the <configuration>.
 
But even with this, I still have "Nothing to build".
Just to be sure, I also tried to add a 3rd <artifactExtension> under <configuration> with org.eclipse.cdt.build.core.buildArtefactType.exe as <checkBuildProperty> value, but made no difference. Still get "Nothing to build".
 
 
 
I am mentioning again that if I use cdt.managedbuild.tool.gnu.c.linker as a <superClass> of my linker, everything working fine. This might indicate that <configuration>, <artifacExtension>, <projectType> and all other properties of my toolchain is configured fine, and I should focus on the linker, and figure our what do I still miss from the linker to make the compile, link and build working. But this is just as guess.
 
 
 
Regards,
Tamas
 

>>> Derek Morris <dmsubs@xxxxxxxxxxxxx> 9-1-2013 16:58 >>>
It is an attribute of a <configuration> and it defines the filename extension of the linker output file (i.e. "exe"). if it is not defined, I would guess that Make does not know what you are trying to create...

On 9 Jan 2013, at 15:55, "Tamas Csabina" <t.csabina@xxxxxxxxx> wrote:

Hi Derek,
 
<projectType> and <configuration> is defined (see attached plugin.xml)
However I don`t know what artifactExtensions is? And how to define it.
 
 
Regards,
Tamas


>>> Derek Morris <dmsubs@xxxxxxxxxxxxx> 9-1-2013 16:50 >>>
"Nothing to build" probably means that make does not now how to convert your source files into an 'executable'. Have you defined a <projectType> and <configutation> and defined an artifactExtension?

On 9 Jan 2013, at 13:11, Tamas Csabina <t.csabina@xxxxxxxxx> wrote:

Hello Sebastian,
 
Thank you for the reply.
 
I`ve already examined the mentioned toolchain (cdt.managedbuild.tool.gnu.c.linker), but I was not able to figure out what options/subitems do I need from it to make my toolchain work. I`ve also tried to copy all sub items of the cdt.managedbuild.tool.gnu.c.linker tool and create everything under my linker tool. But even with this extended toolchain I got "Info: Nothing to build" message when I test the plugin.
 
And, just to mention again, if I inherit my linker from to mentioned linker (by defining the superClass property to be cdt.managedbuild.tool.gnu.c.linker), everything is working fine, project files compiled, linked and built. If I remove this declaration from the superClass property, I get back to "Nothing to build".
 
 
I also wanted to figure out what is happening in the background before the "Nothing to build" message, or before the successful compile+link occurs. I am testing the plugin as described in the help: Right click on the toolchain project, and select Run As -> Eclipse application. But even if I add the -debug parameter in the Arguments I haven`t seen anything useful in the Console of the calling Eclipse instance, which can be used to figure out how do we get to "Nothing to build".
 
 
You`ve mentioned that you implemented your own toolchain. Have you inherited the linker or created a new one? If the latter, have you faced similar issues with "Nothing to build"?
 
 
 
Thanks again for your time and effort!
 
 
Regards,
Tamas
 


>>> Sebastian Wagner <se.wagner@xxxxxx> 8-1-2013 14:06 >>>
Hi Tamas,

I'm not an expert, but implemented also an own toolchain. To make it work I studied the GCC project which you can access from the Git repository. You find the build definitions in the plugin.xml file of the project "org.eclipse.cdt.managedbuilder.gnu.ui". So you can compare the linker settings they use to yours.

Sebastian


Date: Mon, 7 Jan 2013 16:52:04 +0100
From: t.csabina@xxxxxxxxx
To: cdt-dev@xxxxxxxxxxx
Subject: Re: [cdt-dev] problem creating a custom toolchain`s linker

Dear Group,
 
 
I bring up this subject once again, as I still have the issue. I haven`t got any reply on this, nor in the forums. After this I won`t bother the list again, but I had to give it a last chance.
 
Regards,
tamas

>>> Tamas Csabina 15-11-2012 08:38 >>>
Hi,
 
First of all I have to say that I know that this list is not the best place to ask questions like mine, but after days of struggle I have no option left. I tried the users forums already, but got no replies to my questions there.
Searching through the archives I have found similar questions to be asked, so I dared to fire mine.
 
About the problem:
Currently we use the MinGW Toolchain to build our C projects. We use a special compiler and linker instead of gcc, and this is working fine.
But as the mingw toolchain`s linker got so many options that we don`t use, I want to create a custom toolchain, which only contains the options for our compiler and linker.
Alternatively I could inherit the not used options, and use the applicabilityCalculator to hide them, but as far as I know it can be used for options only and not for optionCategory, so that won`t do the trick.
 
 
So I`ve ran through the Managed Build System Extensibility Document to create my custom toolchain. Did the tutorial in Chapter 6. But unfortunately the document doesn`t describe how to create a linker tool. What fields are necessary to make this linker work? Because no matter what I do with my linker tool, during project build I got "Nothing to build".
If I inherit the GCC C Linker (cdt.managedbuild.tool.gnu.c.linker) the project builds fine, so I guess my other objects (compiler, builder, target platform, tool-chain, configuration, projectType) are working fine.
 
 
What I also don`t understand, is why a misconfigured linker avoids compilation? It is okay that a complete build won`t happen without a proper linker, but at least I want to see compilation happening, as the builder (to collect what to compile) and the compiler are working fine. Or do I miss some concept here?
 
 
 
I am also willing to create a howto/faq/doc about the subject when I gathered the required information, as there is nothing available at the moment. Probably it would help others out there...
 
 
 
Thanks and regards,
tamas

--
SERCOM Regeltechniek B.V.
Heereweg 9
2161 AB Lisse
Nederland
+31 (0)252 416530 (voice)
+31 (0)252 419481 (fax)

http://www.sercom.nl/

Op al onze offertes, op alle opdrachten aan ons en op alle met ons gesloten overeenkomsten zijn toepasselijk de METAALUNIEVOORWAARDEN, gedeponeerd ter Griffie van de Rechtbank te Rotterdam, zoals deze luiden volgens de laatstelijk aldaar neergelegde tekst. De leveringsvoorwaarden worden u op verzoek toegezonden.

De informatie/inhoud van dit e-mail bericht (en bijlagen) is uitsluitend bestemd voor de geadresseerden. SERCOM staat niet in voor juiste dan wel volledige overbrenging van de inhoud van dit e-mail bericht. SERCOM kan niet garanderen dat een verzonden e-mail bericht wordt overgebracht zonder inbreuk of tussenkomst van derden, noch de tijdige ontvangst ervan. Indien bovenstaand e-mail bericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mail bericht te retourneren aan de verzender en het origineel en eventuele kopien te verwijderen en te vernietigen. 


The information in this e-mail is intended only for use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Access to this e-mail by anyone else than the addressee is unauthorised.. If you are not the intended recipient, any disclosure, copying, distribution or any action taken omitted to be taken in reliance of it, is prohibited and may be unlawful. If you are not the intended recipient please contact the sender by return e-mail and destroy all copies of the original message. 
---

_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev

--
SERCOM Regeltechniek B.V.
Heereweg 9
2161 AB Lisse
Nederland
+31 (0)252 416530 (voice)
+31 (0)252 419481 (fax)

http://www.sercom.nl/

Op al onze offertes, op alle opdrachten aan ons en op alle met ons gesloten overeenkomsten zijn toepasselijk de METAALUNIEVOORWAARDEN, gedeponeerd ter Griffie van de Rechtbank te Rotterdam, zoals deze luiden volgens de laatstelijk aldaar neergelegde tekst. De leveringsvoorwaarden worden u op verzoek toegezonden.

De informatie/inhoud van dit e-mail bericht (en bijlagen) is uitsluitend bestemd voor de geadresseerden. SERCOM staat niet in voor juiste dan wel volledige overbrenging van de inhoud van dit e-mail bericht. SERCOM kan niet garanderen dat een verzonden e-mail bericht wordt overgebracht zonder inbreuk of tussenkomst van derden, noch de tijdige ontvangst ervan. Indien bovenstaand e-mail bericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mail bericht te retourneren aan de verzender en het origineel en eventuele kopien te verwijderen en te vernietigen. 


The information in this e-mail is intended only for use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Access to this e-mail by anyone else than the addressee is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken omitted to be taken in reliance of it, is prohibited and may be unlawful. If you are not the intended recipient please contact the sender by return e-mail and destroy all copies of the original message. 
---
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


--
SERCOM Regeltechniek B.V.
Heereweg 9
2161 AB Lisse
Nederland
+31 (0)252 416530 (voice)
+31 (0)252 419481 (fax)

http://www.sercom.nl/

Op al onze offertes, op alle opdrachten aan ons en op alle met ons gesloten overeenkomsten zijn toepasselijk de METAALUNIEVOORWAARDEN, gedeponeerd ter Griffie van de Rechtbank te Rotterdam, zoals deze luiden volgens de laatstelijk aldaar neergelegde tekst. De leveringsvoorwaarden worden u op verzoek toegezonden.

De informatie/inhoud van dit e-mail bericht (en bijlagen) is uitsluitend bestemd voor de geadresseerden. SERCOM staat niet in voor juiste dan wel volledige overbrenging van de inhoud van dit e-mail bericht. SERCOM kan niet garanderen dat een verzonden e-mail bericht wordt overgebracht zonder inbreuk of tussenkomst van derden, noch de tijdige ontvangst ervan. Indien bovenstaand e-mail bericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mail bericht te retourneren aan de verzender en het origineel en eventuele kopien te verwijderen en te vernietigen.


The information in this e-mail is intended only for use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Access to this e-mail by anyone else than the addressee is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken omitted to be taken in reliance of it, is prohibited and may be unlawful. If you are not the intended recipient please contact the sender by return e-mail and destroy all copies of the original message.
---
<plugin.xml>_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


--
SERCOM Regeltechniek B.V.
Heereweg 9
2161 AB Lisse
Nederland
+31 (0)252 416530 (voice)
+31 (0)252 419481 (fax)

http://www.sercom.nl/

Op al onze offertes, op alle opdrachten aan ons en op alle met ons gesloten overeenkomsten zijn toepasselijk de METAALUNIEVOORWAARDEN, gedeponeerd ter Griffie van de Rechtbank te Rotterdam, zoals deze luiden volgens de laatstelijk aldaar neergelegde tekst. De leveringsvoorwaarden worden u op verzoek toegezonden.

De informatie/inhoud van dit e-mail bericht (en bijlagen) is uitsluitend bestemd voor de geadresseerden. SERCOM staat niet in voor juiste dan wel volledige overbrenging van de inhoud van dit e-mail bericht. SERCOM kan niet garanderen dat een verzonden e-mail bericht wordt overgebracht zonder inbreuk of tussenkomst van derden, noch de tijdige ontvangst ervan. Indien bovenstaand e-mail bericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mail bericht te retourneren aan de verzender en het origineel en eventuele kopieën te verwijderen en te vernietigen.


The information in this e-mail is intended only for use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Access to this e-mail by anyone else than the addressee is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken omitted to be taken in reliance of it, is prohibited and may be unlawful. If you are not the intended recipient please contact the sender by return e-mail and destroy all copies of the original message.
---
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top