WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help on "make" a program in tinycore  (Read 12204 times)

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Help on "make" a program in tinycore
« on: August 16, 2013, 10:01:12 AM »
Hi I'm trying to use a very small web-server for our raspberry.

It will allow us to control our raspberry through a web-page it supports CGI and is much smaller than anything else.

It can be found here: https://github.com/m2ware/OliWeb
Wiki on how to "make it" : https://github.com/m2ware/OliWeb/wiki

Discussion here:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=36&t=50199

It should be simple to use, according to the instruction you can download the zipped files, extract them and the cd to the IvySox directory where you use the "make all" command.

This produces an error, but as this is my first attempt of using make in tinycore linus (except when building kernel and modules) I'm not sure if this is the correct way to do it in tinycore llinux.

So can anybody spot what I'm doing wrong here - or suggest what to do?

Thanks
Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #1 on: August 16, 2013, 11:19:43 AM »
What is the error message? Did you install compiler and tools?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Help on "make" a program in tinycore
« Reply #2 on: August 16, 2013, 01:47:16 PM »
For that use, I would recommend the busybox httpd server: it's both smaller and well tested.
The only barriers that can stop you are the ones you create yourself.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help on "make" a program in tinycore
« Reply #3 on: August 16, 2013, 01:57:49 PM »
What is the error message? Did you install compiler and tools?

hi bmarcus.

I have manually downladed and placed in the ondemand folder:
make
gcc
compile-essentials

Code: [Select]
Then I loaded the tools:
tc@box:~$ tce-load -i /mnt/mmcblk0p1/tce/ondemand/compile-essentials.tcz
/mnt/mmcblk0p1/tce/ondemand/compile-essentials.tcz: OK
tc@box:~$ tce-load -i /mnt/mmcblk0p1/tce/ondemand/gcc.tcz
/mnt/mmcblk0p1/tce/ondemand/gcc.tcz: OK
tc@box:~$ tce-load -i /mnt/mmcblk0p1/tce/ondemand/make.tcz
/mnt/mmcblk0p1/tce/ondemand/make.tcz: OK

Then:.........
tc@box:~$ cd /mnt/mmcblk0p1/tce/OliWeb-master/ivySox
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$ make all
make: Warning: File `Makefile' has modification time 1376575293 s in the future
[Compile] IvySox.cpp
In file included from /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/armv6l-unknown-linux-gnueabi/4.6.3/../../../../include/c++/4.6.3/armv6l-unknown-linux-gnueabi/bits/c++config.h:393:0,
                 from /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/armv6l-unknown-linux-gnueabi/4.6.3/../../../../include/c++/4.6.3/string:40,
                 from IvySox.h:35,
                 from IvySox.cpp:28:
/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/armv6l-unknown-linux-gnueabi/4.6.3/../../../../include/c++/4.6.3/armv6l-unknown-linux-gnueabi/bits/os_defines.h:40:22: fatal error: features.h: No such file or directory
compilation terminated.
make: *** [IvySox.o] Error 1
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #4 on: August 16, 2013, 02:21:37 PM »
For that use, I would recommend the busybox httpd server: it's both smaller and well tested.

Or mongoose, which is small, functional, ...

http://code.google.com/p/mongoose/
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Help on "make" a program in tinycore
« Reply #5 on: August 17, 2013, 01:19:28 AM »
Hi sbp
I think you may need  linux-headers-KERNEL.tcz  though I don't see it in the ARM repository.
Quote
I have manually downladed and placed in the ondemand folder:
make
gcc
compile-essentials
You should only need to install  compile-essentials  which should automatically include  gcc  and  make.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #6 on: August 17, 2013, 09:04:13 AM »
Updated mongoose WEB server to 3.8 in repo. Worth to try. It's small and beutiful
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help on "make" a program in tinycore
« Reply #7 on: August 17, 2013, 09:10:19 AM »
Thank you for your suggestions.

I was under the impression that the other web-servers needed PHP or similar in order to be able to do the following:
1. Via the web-page allow users to supply information which then is stored in a config file on the rasperry (like a name for the audio player, or ALSA settings).
2. Then via the web-page execute a script on the raspberry which would restart the player with the new settings.

According to the developer of Oliweb server this is supported out of the box with this little web-server.

Therefore, I'm still very interested in figuring out how to "make" in tinycore.

Is it Ok what I have described in  a few posts above? If it is the right method in tinycore, then I will need to have a look in the makefile to see if there is a problem.

If the problem is missing linux headers as suggested by Rich, how do I manage this?

Steen

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Help on "make" a program in tinycore
« Reply #8 on: August 17, 2013, 10:52:03 AM »
Quote
I was under the impression that the other web-servers needed PHP or similar in order to be able to do the following: ...

No, every web server that supports CGI can do that. 99% of them support CGI :)
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #9 on: August 19, 2013, 08:08:04 PM »
Just built OliWeb on the Pi. No build errors, works fine with the delivered test pages. Will make a .tcz
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help on "make" a program in tinycore
« Reply #10 on: August 20, 2013, 05:41:09 AM »
Dear bmarcus

Thank you so much, your continued support is outstanding.

In order for me to learn, could you please tell me what I did wrong?
Or describe the steps you did in order to build OliWeb server?

Thanks
Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #11 on: August 20, 2013, 06:01:53 AM »
In order for me to learn, could you please tell me what I did wrong?
Or describe the steps you did in order to build OliWeb server?


Do not know. I just typed

Code: [Select]
make all
Nothing special installed for OliWeb, just building in my normal dev environment.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help on "make" a program in tinycore
« Reply #12 on: October 27, 2013, 03:02:07 PM »
Hi

Just wanted to make the Oliweb server again, as there has been an important update (can now parse "POST" inputs correctly).
But now I have problems - I don't know exactly the cause as I'm now using piCore 5 (previously used 4.7.7) - but I must admit that I also might have forgot what I did last time.

This time I installed the compile-essentials.tzc on piCore v5.

Then I tried to make the OliWeb server but got this error:
Code: [Select]
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$ make all
[Compile] IvySox.cpp
make: g++: Command not found
Makefile:27: recipe for target 'IvySox.o' failed
make: *** [IvySox.o] Error 127
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$


If I try to load gcc I get this error:
Code: [Select]
tc@box:/mnt/mmcblk0p1/tce/OliWeb-master/ivySox$ tce-load -i gcc
mount: mounting /dev/loop38 on /tmp/tcloop/gcc failed: Invalid argument

Is that something that I should fix first and how.

Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help on "make" a program in tinycore
« Reply #13 on: October 27, 2013, 06:43:09 PM »
Current git version of OliWeb builds and runs fine in piCore 5.0alpha6

Do not use /mnt/mmcblk0p1, it is for boot only, nothing else. Your build false bacuse it is

1) Too small
2) It is FAT type, not LINUX

Create an ext4 LINUX partition and repeat installation there.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."