I would like to make cross-compile environment.
With --force, I installed confd6.4 for other architecture(powerpc) in my linux system(x86).
to make fxs file from *.yang, I ran “confdc -c aaa.yang”.
however, I couldn’t get correct result (I couldn’t see fxs file) and following message was shown.
line 29: /home/test/confd6.4/lib/confd/erts/bin/confdexec : cannot excute binary file
line 29: /home/test/confd6.4/lib/confd/erts/bin/confdexec : Success
How can I get correct environment to run cross-compile ?
Is it right to use fxs files and header files(that are made in x86) in powerpc architecture ?
I believe the fxs files are platform independent. Did you try to use x86 confd compiler (on your linux system) to make fxs binary that can be used on powerpc?
I suggest to use same bit version, means 32bit version if you compile for 32bit target and same for 64bit.
Of course, for other binary files (application, object files, libraries) you need to use cross compiler (e.g. gcc).
I should add that the IPC mechanism is platform independent as well, so you could have an application running on PPC, and the ConfD daemon running on x86.
You can run 32-bit confd (and confdc) for Intel, i.e. the i686 version, on your 64-bit Intel system, provided that it has 32-bit support (it typically does). But you obviously can’t execute confd (or confdc) for PPC on your Intel system, regardless of word size. And as @mnovak thought, fxs files are platform independant, so you’re better off installing 64-bit confd for Intel, i.e. the x86_64 version, for building (and using) the fxs files on your 64-bit Intel system.
This check has been there since 64-bit Intel systems first appeared, and users tried to install confd for 32-bit Intel on them, without even knowing that they had a 64-bit system. As noted, confd/confdc will work, but you get very confusing errors when trying the examples, since you would actually need cross-compilation for them. As @joggu already found out, the --force option to the installer overrides the 32-vs-64-bit check, and makes the installer assume that you know what you’re doing…