wviewweather.com Forum Index wviewweather.com
wview and Weather Topics
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Experience with wview/Postgres/OS X

 
Post new topic   Reply to topic    wviewweather.com Forum Index -> wview Installation
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Aug 17, 2005 10:11 am    Post subject: Experience with wview/Postgres/OS X Reply with quote

Ok, so I got xview up and running yesterday. Thought I would share my experience in hopes of making things go better for others in the future.

First, my setup:

Vantage Pro 2
2.0Ghz iMac running Tiger
Postgres 8.0.3 running on the iMac

I first tried to install without using Darwin Ports because, well, it's a religious thing. It was going OK except when I got to libGD which, as far as I can tell, just won't compile "stand alone." So I bit the bullet and did Darwin Ports which worked for libGD much better.

However, the following problems exist, most of which have to do with my desire to use Postscript as my database:

1. The autoconfiguration scripts for radlib and wview don't know how to find Postscript (either the includes or the libraries) and there is no configure option to tell them where they are. My Postscript was downloaded directly from the Postscript web site and installed in the default directories, namely /usr/local/pgsql/include and /usr/local/pgsql/lib.

The configure scripts for radlib and wview didn't find them there and did not add those directories as -L and -I targets to the makefiles. Once I added them manually, after running configure, things worked.

2. Postscript is different from mysql when it comes to how it handles case. In particular, when wview creates the archive table, it uses mixed case to name the attributes. Postscript collapses all that to lower case (all the attribute names in the table are lower case).

This causes trouble later when xview/radlib try and query the table. I changed a bunch of strcmp's to strcasecmps to fix it.

3. Postscripts timestamp format is "yyyymmdd hhmmss" wview was trying to insert a timestamp as "yyyymmddhhmmss" (i.e. no space). I assume it works in mysql. Doesn't in Postscript.

4. The OS X startup script starts all the daemons except for wunderground. I had to add that one manually.

You can see my station at: http://fluckmill.dyndns.org/~weather/

greg travis
Back to top
mteel



Joined: 30 Jun 2005
Posts: 435
Location: Collinsville, TX

PostPosted: Wed Aug 17, 2005 2:12 pm    Post subject: Reply with quote

Whew! You went through some issues. Let me try to address them one by one:

Quote:
I first tried to install without using Darwin Ports because, well, it's a religious thing. It was going OK except when I got to libGD which, as far as I can tell, just won't compile "stand alone." So I bit the bullet and did Darwin Ports which worked for libGD much better.

Yep, I don't know the MacOSX "religion" very well, but it is derived from FreeBSD 4.4, which lives and breathes on the ports facility. DarwinPorts is an extension of that so you shouldn't feel like there is anything foreign about DarwinPorts.

Quote:
1. The autoconfiguration scripts for radlib and wview don't know how to find Postscript (either the includes or the libraries) and there is no configure option to tell them where they are. My Postscript was downloaded directly from the Postscript web site and installed in the default directories, namely /usr/local/pgsql/include and /usr/local/pgsql/lib.

This must be another MacOSX oddity - I installed and tested PostgreSQL on a FreeBSD 5.4 PC and the installation directories worked out fine. My autoconf/configure script is not the most advanced on earth, feel free to enhance it and I will be glad to incorporate it into wview.
In the meantime, I will add those paths more directly to the builds.

Quote:
2. Postscript is different from mysql when it comes to how it handles case. In particular, when wview creates the archive table, it uses mixed case to name the attributes. Postscript collapses all that to lower case (all the attribute names in the table are lower case).

This one puzzles me. I assume you are talking about naming the columns? I had no trouble with PostgreSQL on the FreeBSD PC - you make it sound like I never tried it! I would love to hear solutions which are more than just "slash and burn" so it works on Mac. It needs to work for all, and that includes not bastardizing radlib just for Mac.

Quote:
3. Postscripts timestamp format is "yyyymmdd hhmmss" wview was trying to insert a timestamp as "yyyymmddhhmmss" (i.e. no space). I assume it works in mysql. Doesn't in Postscript.

Again, worked fine for FreeBSD. Don't make sweeping statements about PostgreSQL, you are running on a wierd bird named Mac.

Quote:
4. The OS X startup script starts all the daemons except for wunderground. I had to add that one manually.

You must have grabbed the 1.7.0 start script for Mac - I'm looking at it in the 1.7.1 distro right now, looks fine.

I'm glad you are up and running. Realize I have spent literally thousands of hours working on this free software, which is quite good by the way, so please don't be too quick to be critical. MacOSX support was an afterthought believing it should fall right out being a FreeBSD-based beast. I have learned since that Apple finds ways to make everything just a little bit different. It sounds like you are pretty savvy working through these things, how about contributing some solutions to improve the MacOSX experience for others? I really like it when others chip in and help. I'm not making any money on this Wink and probably have less free time than most folks. An enhanced autoconf script and/or solutions for the oddities you are seeing with PostgreSQL on Mac would be good for starters. I am not going to spend time installing PostgreSQL on my Mac Mini. Again, worked great on my FreeBSD box and I don't know what should be closer to a Darwin Mac than that.

Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Wed Aug 17, 2005 2:26 pm    Post subject: Reply with quote

Don't take my comments as being critical -- I really like wview and, if anything, want to encourage you to keep developing it! My comments were aimed more at those attempting to go down the same road as I, not at criticism of wview itself.

I agree that my "fixes" for the case problem were of the slash-n-burn variety. It was 10PM last night and I just wanted to start getting rows into the database.

What version of Postgres did you test against? Again, I'm running 8.0.3 on the iMac which I built by doing nothing more than downloading it from the Postgres site, doing a ./configure, a make, and a make install. No other tweaking. Is it possible that you tested with 7.x.y?

oh, one other thing (and this isn't a wview criticism either) but the OS X Tiger defaults for shared memory are embarassingly low. xview/radlib won't run on Tiger by default because it can't get enough shared memory.

The solution is to edit /etc/rc and change the line that says:

sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024

To something more reasonable. I use:

sysctl -w kern.sysv.shmmax=536870912 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=131072

Finally, yes, I initially started with 1.7.0 -- that must have been where the wunderground daemon problems came in. I'm running 1.7.1 now.

Thanks for a great package!

greg
[/url]
Back to top
mteel



Joined: 30 Jun 2005
Posts: 435
Location: Collinsville, TX

PostPosted: Wed Aug 17, 2005 2:36 pm    Post subject: Reply with quote

No problem. Just wanted you to know where I was coming from and how I developed the PostgreSQL support. I'm not as sensitive as that may have sounded, but I have been getting deluged with new oddball requirements lately and I have to seriously back off on the time I have been investing in wview going forward. Time for the more astute wview users to get involved in the effort!

I definitely was using 7.3.X when I was testing - I have no idea if that makes a difference.

I would really appreciate any time you can spend working out the best solution for the timestamp and case issues for the column names. You should be able to investigate how MySQL does things vs. PostgreSQL online without installing it. Yes, I know you don't care about MySQL - I don't care about PostgreSQL - but I have tried to provide it for those who do. Any help would be greatly appreciated and noted in the AUTHORS file.

Thanks for the heads up on the shared memory - I don't recall having to dork with that on my 10.3.8 install, but I have slept since then. I will add that to the MacOSX Quick Start Guide. See there, you are already contributing!

Thanks,
Mark


Last edited by mteel on Thu Aug 18, 2005 10:26 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mteel



Joined: 30 Jun 2005
Posts: 435
Location: Collinsville, TX

PostPosted: Wed Aug 17, 2005 3:16 pm    Post subject: Reply with quote

FYI, you need to move Clouds.jpg from /var/wview/img to your web site document root. It would be a good idea to move all files in /var/wview/img there in case you ever need them. Then you will have a nice cloud background Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    wviewweather.com Forum Index -> wview Installation All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group