Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » issue with packages having name linux
issue with packages having name linux [message #557788] Wed, 08 September 2010 22:37 Go to next message
Badri is currently offline BadriFriend
Messages: 17
Registered: July 2009
Junior Member
Champs,
I have a package ti.omx.demos.vc.linux. I use Program.global.<config_variables> in the executable of this package. I am using CodeSourcery compiler and compiling for GCArmv5T target.
I get compile errors as unable to include the xdc_cfg_header.
It appears this is because definition of xdc_cfg_header is as below

-Dxdc_cfg__header__='ti/omx/demos/vc/1 /package/cfg/bin/host_platforms_arm/debug/omxDemoVc3_A8_xv5T .h'

Correct defintion would be
-Dxdc_cfg__header__='ti/omx/demos/vc/linux /package/cfg/bin/host_platforms_arm/debug/omxDemoVc3_A8_xv5T .h'

The word "linux" is getting replaced by "1" for some reason .
I am using xdc version xdctools_3_20_01_51.
Please advice on how to resolve the issue. I prefer not to change the package name to solve the issue if possible.

Regards
Badri
Re: issue with packages having name linux [message #557801 is a reply to message #557788] Thu, 09 September 2010 01:40 Go to previous messageGo to next message
Jon Rowlands is currently offline Jon RowlandsFriend
Messages: 6
Registered: July 2009
Junior Member
Badri,

The "xdc_cfg__header__" symbol is expanded by the preprocessor (unfortunately), when it gets used in file "$XDCROOT/packages/xdc/cfg/global.h".

You probably have a line:
#define linux 1

or equivalent compiler -D option.

To avoid this, make sure "linux" is not defined until after this line in your .c file:
#include <xdc/cfg/global.h>


If this isn't possible, another option is to rename the "linux" symbol to "LINUX" or similar.

Jon
Re: issue with packages having name linux [message #557806 is a reply to message #557801] Thu, 09 September 2010 04:24 Go to previous messageGo to next message
Badri is currently offline BadriFriend
Messages: 17
Registered: July 2009
Junior Member
Jon,
Thanks for the clarification.Unfortunately I am not defining linux . It appears to be defined by the codeSourcery compiler internally so there is no way I can prevent it from getting defined. Based on your input it appears I have no choice but to rename the package name which I wanted to do.
Has anyone else faced similar issue when naming package as linux and compiling with codesourcery toolchain or is it some quirk in my environment ?
Regards
Badri
.
Re: issue with packages having name linux [message #557965 is a reply to message #557806] Thu, 09 September 2010 15:59 Go to previous messageGo to next message
Chris Ring is currently offline Chris RingFriend
Messages: 16
Registered: July 2009
Location: Santa Barbara, CA
Junior Member
For what little it's worth, I have packages with 'linux' in the name (e.g. 'ti.sdo.ce.osal.linux'), but it's a 'metaonly' package so I don't think it suffers from this issue. It does build with codesourcery tools.

So, this issue seems to be limited to 'target modules'. If you're weighing the cost of changing your pkg name, you might counter that with the cost of changing your module from a 'target module' to a 'metaonly module' and what features you might lose (or gain!).

Chris
Re: issue with packages having name linux [message #557970 is a reply to message #557965] Thu, 09 September 2010 16:11 Go to previous messageGo to next message
Chris Ring is currently offline Chris RingFriend
Messages: 16
Registered: July 2009
Location: Santa Barbara, CA
Junior Member
Looking a little closer, I found a pkg I have that _does_ have target modules (i.e. ti.sdo.xdcruntime.linux) with linux in the name. This package builds libraries, not executables, and it doesn't use Program.Global anywhere... so maybe the issue is further limited to pkgs with 'linux' in their name that build executables?

I don't see anywhere in my build a -Dxdc_cfg__header='ti/sdo/xdcruntime/linux/...', so I don't understand the use case causing this -D to be set. Maybe others here could point out when that -D is thrown?

Chris
Re: issue with packages having name linux [message #557986 is a reply to message #557788] Thu, 09 September 2010 17:17 Go to previous messageGo to next message
Jon Rowlands is currently offline Jon RowlandsFriend
Messages: 6
Registered: July 2009
Junior Member
Badri,

It's a horrible hack, but another workaround is to #undef linux just before including xdc/cfg/global.h, and #define it again just after. Would work as long as nothing in the generated include file actually requires "linux" to be defined.

Chris,

I believe that's correct, this variant of the problem is mostly limited to packages that build executables, because those are mostly the ones that #include global.h. User-built libraries could too, technically, if they wanted to compile in details of a configuration.

The same issue applies to the target types header included by xdc/std.h, and this would affect more packages. I'm looking to see whether there's any fix we could implement in a future release, not sure yet.

Jon
Re: issue with packages having name linux [message #558906 is a reply to message #557788] Tue, 14 September 2010 20:14 Go to previous message
Jon Rowlands is currently offline Jon RowlandsFriend
Messages: 6
Registered: July 2009
Junior Member
Fix for this is expected to be in XDCtools 3.21, to be
released later this year. Eclipse bug id is #320943.
Jon
Previous Topic:Bug in xdc_runtime_Registry_addModule function ?
Next Topic:Increasing Java maxHeapSize programatically in a xs script
Goto Forum:
  


Current Time: Sat Apr 20 13:33:07 GMT 2024

Powered by FUDForum. Page generated in 0.03591 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top