PDA

View Full Version : Gina! Ubuntu Problem


Paul
1st June 2008, 21:58
I have been using ubuntu for some time now (2 years maybe) and fine until I want to install a program called open2300 (its a weather station program)

I have tried the ubuntu forums with little luck http://ubuntuforums.org/showthread.php?p=5083559#post5083559

any ideas whats wrong?

Gina
2nd June 2008, 00:09
I'm afraid I don't know Paul. Your last post shows warnings which is not good but better than errors. I presume your app doesn't work. I have been running Ubuntu for a shorter time than you though I may have put more hours in :lol I have only attempted minor compiling from source using make and sudo make install using scripts provided by the author - I don't have much experience with that area of Linux. It looks to me as if there are errors in the "makefile". But you have put you question in the right place and I expect someone will help you in Ubuntu Forums - there are many experienced people that post there. OTOH you may get help here - Mark is in programming and Linux and might have some suggestions.

silver
2nd June 2008, 17:50
does it compile and run?

The warnings and may or may not stop the compiled app from running :)

Paul
3rd June 2008, 12:45
I have not got it to run yet, nothing seems to work, I fear I may have to give up, or find another program (like use a windows program in wine, but that seems to be deafeating the object)

Gina
3rd June 2008, 14:34
I downloaded it and tried make but got errors and warnings. The errors were for missing files. I tried fiddling with the Makefile but no joy (not that I really knew what I was doing :lol). I'm afraid I don't know C - many other programming languages, but not C! I've been meaning to learn it but never actually got around to it - too much else to do. (I could fill 2 or 3 lifetimes with what I'd like to do!)

Paul
3rd June 2008, 17:59
well I think you should learn it just so I get tell what tempature it is :lol :lol

silver
3rd June 2008, 23:44
looking at the output it looks like not all the info has been captured,. the warnings don't look fatal,. what happens at the very end of the output or is that all there is?

Paul
4th June 2008, 12:36
nothing happens AFAIW

Gina
4th June 2008, 12:48
I'll run the make again and post the results. It certainly seems a few files were missed out of the archive :(

Gina
4th June 2008, 13:54
Here it is :-gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$ make
gcc -Wall -O3 -DVERSION=\"1.10\" -c -o open2300.o open2300.c
In file included from rw2300.h:15,
from open2300.c:11:
linux2300.h:7:21: error: termios.h: No such file or directory
linux2300.h:8:20: error: unistd.h: No such file or directory
linux2300.h:9:24: error: netinet/in.h: No such file or directory
linux2300.h:10:24: error: arpa/inet.h: No such file or directory
linux2300.h:11:23: error: sys/ioctl.h: No such file or directory
linux2300.h:12:24: error: sys/socket.h: No such file or directory
linux2300.h:13:19: error: netdb.h: No such file or directory
In file included from open2300.c:11:
rw2300.h:18:20: error: string.h: No such file or directory
rw2300.h:19:19: error: fcntl.h: No such file or directory
rw2300.h:20:19: error: stdio.h: No such file or directory
rw2300.h:21:18: error: time.h: No such file or directory
rw2300.h:22:20: error: stdlib.h: No such file or directory
rw2300.h:24:18: error: math.h: No such file or directory
rw2300.h:25:23: error: sys/types.h: No such file or directory
rw2300.h:26:22: error: sys/stat.h: No such file or directory
open2300.c: In function ‘print_usage’:
open2300.c:27: warning: implicit declaration of function ‘printf’
open2300.c:27: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:36: warning: implicit declaration of function ‘exit’
open2300.c:36: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c: In function ‘main’:
open2300.c:81: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:84: warning: implicit declaration of function ‘strcmp’
open2300.c:87: warning: implicit declaration of function ‘atoi’
open2300.c:91: warning: implicit declaration of function ‘strlen’
open2300.c:91: warning: incompatible implicit declaration of built-in function ‘strlen’
open2300.c:95: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:96: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:103: warning: implicit declaration of function ‘strtol’
open2300.c:103: error: ‘NULL’ undeclared (first use in this function)
open2300.c:103: error: (Each undeclared identifier is reported only once
open2300.c:103: error: for each function it appears in.)
open2300.c:111: warning: incompatible implicit declaration of built-in function ‘strlen’
open2300.c:115: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:116: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:123: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:124: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:143: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:144: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:173: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:174: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:178: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:203: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:204: warning: incompatible implicit declaration of built-in function ‘exit’
open2300.c:208: warning: incompatible implicit declaration of built-in function ‘printf’
open2300.c:226: warning: incompatible implicit declaration of built-in function ‘exit’
make: *** [open2300.o] Error 1
gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$

And this is a list of the files in the archive :-gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$ ls
api.txt dump2300.c htdocs linux2300.c Makefile~ mysql2300.c pgsql2300.c VERSIONS wu2300.c
bin2300.c fetch2300.c INSTALL linux2300.h Makefile-windows mysql2300.sql README win2300.c xml2300.c
COPYING histlog2300.c interval2300.c log2300.c memory_map_2300.txt open2300.c rw2300.c win2300.h
cw2300.c history2300.c light2300.c Makefile minmax2300.c open2300-dist.conf rw2300.h windows-bin
gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$

As can be seen the errors are right - those files aren't there! :confused:

silver
4th June 2008, 16:19
Here it is :-And this is a list of the files in the archive :-As can be seen the errors are right - those files aren't there! :confused:

yep - Paul had the same issues at the start of the thread http://ubuntuforums.org/showthread.php?p=5083559#post5083559 but further down after sudo apt-get install build-essential it looks like it should compile (or get much closer)

Gina
4th June 2008, 16:38
Ah yes - good point. I missed that. I probably haven't got build-essential installed - this is a fairly new install.

A bit later... installed build-essential and now I get the same as Paul at that point.

Gina
4th June 2008, 17:28
Well, it seems to have installed OK - but I can't test it 'coz I don't have the hardware. I've highlighted my entries.gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$ sudo make install
mkdir -p /usr/local/bin
install open2300 /usr/local/bin
install dump2300 /usr/local/bin
install log2300 /usr/local/bin
install fetch2300 /usr/local/bin
install wu2300 /usr/local/bin
install cw2300 /usr/local/bin
install histlog2300 /usr/local/bin
install xml2300 /usr/local/bin
install light2300 /usr/local/bin
install interval2300 /usr/local/bin
install minmax2300 /usr/local/bin
gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$$ ls /usr/local/bin
cw2300 dump2300 fetch2300 histlog2300 interval2300 light2300 log2300 minmax2300 open2300 wu2300 xml2300
gina@Medion-Hardy:~/Desktop/Open-weather-station/open2300-1.10$

Paul
5th June 2008, 16:50
ok I have done the ls /usr/local/bin command

now how do I run the program?

Gina
6th June 2008, 09:45
Type the name of the utility you want into the command line followed by <return>
eg. open2300 will run the Open utility and tell you what info it wants etc.

Paul
6th June 2008, 15:45
hmm nothing seems to happen.

I have got a windows program - WUHW to do what I want, and it seems to work fine with wine (apart from when you start the program it states falal error - then runs normally :lol)

http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IENGLAND178 is my station ID, no wind speed yet though, not got that set up.

Thanks everyone for your help, I really appreciate it :)

onomatopoeia
9th June 2008, 09:01
I'm just concerned that it seems a default install of that version of ubuntu lacks stdio.h :eek:.

Gina
9th June 2008, 09:10
I can check further on that. It could be that Ubuntu is aiming at the general user but OTOH it's so easy to make and install that even general users should be able to do it. Compiling and installing from source used to be rather a long winded process when I was writing software. Things have certainly progressed a lot since then :)