eLua sim target: Linker error.

classic Classic list List threaded Threaded
4 messages Options
raman raman
Reply | Threaded
Open this post in threaded view
|

eLua sim target: Linker error.


Dear eLua community,

I finally gave the new eLua build system a shot. Today, I tried
compiling the eLua code base for the sim target but I got the
following linker error:

bin/../lib/gcc/i686-elf/4.7.2/../../../../i686-elf/lib/libc.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text+0x1d): undefined reference to `kill'
collect2: error: ld returned 1 exit status

The eLua version information is here: v0.9-45-g0183532

The toolchain information is here:
i686-elf-gcc (Sourcery CodeBench Lite 2012.09-60) 4.7.2

To fix this I added a reference to the same in newlib/stubs.c. Can
someone please fix this in the master?

The reference to `_kill' in stubs.c is still required for the ARM
targets. So, may be conditionally compile the reference to `kill'?

Best,
Raman
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: eLua sim target: Linker error.

Hello,


On Sun, Jun 16, 2013 at 11:37 AM, raman <[hidden email]> wrote:

Dear eLua community,

I finally gave the new eLua build system a shot. Today, I tried
compiling the eLua code base for the sim target but I got the
following linker error:

Does this work with the old build system and the same toolchain? This would be quite strange.
 

bin/../lib/gcc/i686-elf/4.7.2/../../../../i686-elf/lib/libc.a(lib_a-signalr.o):
In function `_kill_r':
signalr.c:(.text+0x1d): undefined reference to `kill'
collect2: error: ld returned 1 exit status

The eLua version information is here: v0.9-45-g0183532

The toolchain information is here:
i686-elf-gcc (Sourcery CodeBench Lite 2012.09-60) 4.7.2

To fix this I added a reference to the same in newlib/stubs.c. Can
someone please fix this in the master?

The reference to `_kill' in stubs.c is still required for the ARM
targets. So, may be conditionally compile the reference to `kill'?

I hope we won't need to get there. I would simply add the definition for 'kill' directly (no conditional compilation) and cross my fingers.

Best,
Bogdan
 

Best,
Raman



--
View this message in context: http://elua-development.2368040.n2.nabble.com/eLua-sim-target-Linker-error-tp7578066.html
Sent from the eLua Development mailing list archive at Nabble.com.
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: eLua sim target: Linker error.


Dear Bogdan,

> Does this work with the old build system and the same
> toolchain? This would be quite strange.

No. I tried this with the old build system (official elua0.9
release). It didn't work. The SConstruct file doesn't
include the following files:

src/elua_mmc_sim.c
src/common_fs.c

However, this is not a problem for the new build system.

The other problem was with the undefined reference to
`kill'. When I fixed both the issues, I was then able to
build sim without a problem.

> I hope we won't need to get there. I would simply add
> the definition for 'kill' directly (no conditional compilation)
> and cross my fingers.

OK. Superb then. :)

Best,
Raman
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: eLua sim target: Linker error.


Dear Bogdan,

Just another observation:

> I hope we won't need to get there. I would simply add
> the definition for 'kill' directly (no conditional compilation)
> and cross my fingers.

I have the same linker issue when compiling for the i386
target. The way you suggested (not having conditional
compilation) should work just fine.

Best,
Raman