Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: leehui on June 10, 2015, 10:51:38 PM
-
Hi, all
I have met a problem here.
I am now using Bochs as host system of TinyCore
I successfully installed the CorePlus-crrent.iso(32bit) into the disk(created by bochs tool named bximage), then I complied a simple "hello world" c program for tiny core on my ubuntu and copied it under the root dir of the disk. Finally it ran well.
But when I boot the 32bit Tiny core directly from iso file, and mounted the disk that held the binary file. the program could not run. Similarly, a 64-bit program could not run when directly boot from a 64-bit iso.
Then, I install a pure 32bit tinycore into another disk without any extensions, and substituded the core.gz and vmlinuz with 64bit version, and tried to run the program, failed again.
I am new of TinyCore, Please help!
-
Please post the error message you get.
-
the error message is very strange:
hello: line 1: syntax error: unexpected "("
where "hello" is the name of the binary, and ran well on my ubuntu.
is there any experience of running binaries on 64 bit TinyCore???
-
Often that error means that the bash extension is required.
-
Then it is not a binary, you copied a script.
-
Hi, Juanito
I installed the bash.tcz, this time the bash shows that "hello: cannot execute binary file".
It seems that the hello is not recognised
But I am sure that the hello is compiled by gcc of my ubuntu(64bit), I do not know why.
-
For best compatibility, you should compile on TinyCore.
-
Hi leehui
... bash shows that "hello: cannot execute binary file".
That sounds like you entered something like this to try to execute your file:
bash helloIs the program located in a directory that's listed in the PATH environmental variable? If it is, then just hello should allow
it to execute. If it's not in the path, but in the directory you are currently in, then ./hello should work. If it's not in the path, but
in a different directory, then /path/to/program/hello should work.
-
"ldd /path-to-file/hello" might also be worth trying.
-
Hi Rich
I have tried all the methods you mentioned, it did not work. It seems because the incompatibility between two platforms
Hi Juanito
I have tried "ldd /home/tc/hello", it echoed :
linux-vdso.so.1 (0x00007f7f076b5000)
libc.so.6 = > /lib/libc.so.6 (0x00007f7f076b5000)
/lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x00007f7f076b5000)
any problem?
-
CorePure64 does not have /lib64. You could create a symlink, but the best would be to compile locally
-
Hiļ¼Juanito
I think that the /lib64 stands for the dir of my 64bit Ubuntu from where the binary is generated. Now that the ldd can link /lib64 to /lib(stands for the dir of the running TinyCore), symlink should not be needed.
I will Try to install GCC and to compile program locally.
thanks for your reply.
-
OK - be sure to load the compiletc extension rather than gcc alone.