Dear Willy,

I am sorry that you are still having problems. .  I am copying this message to the DSAM mailing list in case there are others who might have successfully compiled DSAM on this platform and can help you. 

It has just occurred to me to try and create a virtual Macintosh machine to test a Mac OS X installation of DSAM, since I don't have a Macintosh System.   I shall get back to you once I have made progress on this which should hopefully be within the next day or so.

I had a look at Macports which you mentioned and believe that DSAM should be able to work with its ready-compiled wxWidgets installations.  Did you use version wxWidgets 2.8.12?  This is the version that is distributed with the Fedora Linux system that I use for development.  I believe that there are some changes in version 2.9.x which break DSAM compilation at present.

The configure stage of the DSAM installation should find the wx-config and put the appropriate flags into the make files;  you should not have to edit the Makefiles at all.

The Installation steps should be:

(1) tar zxvf dsam-2.8.44.tar.gz
(2) cd dsam-2.8.44
(3) ./configure
(4) make
(5) sudo make install

If you do decide to try again and encounter problems, please send me a log of the actual error messages that you get rather than trying to explain them.  This would take up less time and help us to resolve the problems more quickly.

Sincere regards,


...Lowel.


On 9 June 2013 18:39, Willy Wong <[log in to unmask]> wrote:
Dear Lowel,
Thanks for your continuing support.  However I am giving up on this point because it is just too complicated and difficult without extensive programming experience.

Just to review:
1. wxWidgets was already installed on my system correctly through Macports.  However I suspect DSAM was not "seeing it".  Macports installs everything through /opt/usr rather than the usual the usual /usr or /usr/local, etc.
2. So I took your advice and installed wxWidgets manually which should then install into a location that Rundsam would find.
3. Instead of your suggested page
> http://www.wxwidgets.org/docs/faqmac.htm
this page is more updated:
http://wiki.wxwidgets.org/Compiling_wxWidgets_using_the_command-line_(Terminal)
Through the above page, I could configure and properly compile through make.

However upon "make install", I get all kinds of errors.  Moreover, "make" followed by "make install" or just "sudo make install" give different errors.  Sometimes even the Makefile disappears.  (Note: running "make clean" and "sudo make uninstall" first does not help.)

I think this is getting too complicated for the regular DSAM user on OS X.  Again, my only wish was only to have a compiled version of RunDSAM executable so that I can call it under Matlab.  If you know of such a person in possession of this executable, I would very happy to get their contact details and ask them for the file.  I would also love to run the GUI as I really would like to teach using DSAM, but I'll worry about that later.

Many thanks for your help, and you have been very generous with your time.  Much appreciated.
best
Willy



On 2013-06-04, at 3:15 AM, Lowel O'Mard <[log in to unmask]> wrote:

> Dear Willy,
>
> I am glad to hear that you are making some progress, even though you are running into some problems.  As far as I understand, you are having problems installing wxWidgets.  Since MacOS X is a unix system, it should work well, as it has for me in the past.
>
> Have you looked at the following wxwidgets site?
>
> http://www.wxwidgets.org/docs/faqmac.htm
>
>
> Sincere regards,
>
>
> ...Lowel.
>
>
>
> On 2 June 2013 16:34, Willy Wong <[log in to unmask]> wrote:
> Dear Lowel,
> Apologies for taking time in getting back to you.  I am getting further in the installation, but there are still many problems.  You will find some notes from me below if you wish to use it help others.  Given the prevalence of Mac's in academia, I am surprised that there aren't others with similar issues.  A few years ago I compiled with few problems.  Seems like many things are now broken with the newer versions of OS X (probably due to Apple).
>
> Would you happen to know of someone who is using DSAM on a Mac who could provide some help?
> best
> Willy
>
> (1) DSAM library on Mountain Lion OS X.
>
> (basics)
> xcode
> xcode command line tools
> macports (package manager)
>
> The required packages are
> pkgconfig
> fftw3
> xmlto
>
> SUCCESS!
>
> (I also had to manually copy fftw3.h to my install directory.  I know this isn't right.  But adding the path for fftw3.h didn't seem to help.  Anyway, a smarter/savvier person than I can surely figure out how to fix the paths.)
>
> (2) Rundsamsim2
>
> Required packages (thus far)
> wxwidgets
>
> Unfortunately I got stuck after this part.  I got the installer to find the wx subdirectory (actually I copied the entire directory to my install directory).  I also had to manually locate the wx/setup.h file.
>
> However it then complains:
>
> ../../wx/defs.h:47:13: error: #error "No Target! You should use wx-config program for compilation flags!"
>
> Obviously I need to set a target platform.  I ran wx-config --cppflags but am at a loss of how to integrate this with the makefile.
>
>
>
>
> On 2013-05-10, at 10:41 AM, Willy Wong <[log in to unmask]> wrote:
>
> > Thank you for your very kind and detailed response.
> > Actually I already tried installing fttw 3.3.3 from www.fftw.org and manually verified the installation.  However the config flag doesn't change.  Perhaps this is a Mac specific problem.  No matters.  After receiving your email, I decided to manually change the flag to "YES" in the configure file.  This time the compilation goes further.  However there was still errors related to missing xmlto.  Perhaps this is good enough for functionality of library, but I haven't had a chance to study it further at this point.  I'll report back as I continue to work on it.
> > best
> > Willy
> >
> >
> >
> > On 2013-05-09, at 6:41 AM, "Lowel O'Mard" <[log in to unmask]> wrote:
> >
> >> Dear Willy Wong,
> >>
> >> I was very happy to receive you email asking for support.  I am glad that you have found DSAM useful, and I hope that you continue to do so.
> >>
> >> The problem that you have encountered is due to incomplete conditional compilation in the DSAM library.  Please accept my apologies for this.  DSAM uses the FFTW library for FFT support, and produces the error which you encountered when the FFTW library or development package are not available.  If you used the configure script, you might have noticed the line
> >>
> >> ...
> >> checking for FFTW3... no
> >> .....
> >>
> >> - which indicates that the FFTW3 development library is not present.  The FFTW package is easy to compile and install, and can be found at
> >>
> >> http://www.fftw.org
> >>
> >>
> >> I will make the necessary changes to the code to ensure that nobody else encounters this message, and ensure that it is made clear that FFTW is required for compiling the DSAM library.
> >>
> >> I was concerned that you were unable to find me listed as the support for DSAM.  I have since noticed that the indication for my name as an administrator on sourceforge had a "role/position" field which was not filled.  This has now been set to "project manager", which I hope people will translate as the "person to e-mail with problems".  I am also listed as the contact person on the support page of http://dsam.org.uk - did you look there at all?
> >>
> >> With regard to using "ams_ng" as an interface to MatLb, you might find it useful to look at the RunDSAMSim application which provides a more convenient interface to matlab.  It provides a java function which can be called from MatLab which links to the DSAM shared library. It allows the user to assign dsam script outputs directly to matlab matrices, e.g.
> >>
> >> data = RunDSAMSimJ.RunSimScript(simFile, pars, signal);
> >>
> >> Actually I just re-read your e-mail and notice that you said that you are already using RunDSAMSim, so perhaps you know the above already.
> >>
> >>
> >> Please do not hesitate to e-mail again if you have further problems.  I have not used DSAM on Mac OS X for some time, so I would welcome any feedback or information that you might like to provide to ensure that Mac OS X users have a problem free experience.
> >>
> >> Sincere regards,
> >>
> >> ...Lowel.
> >>
> >>
> >> On 9 May 2013 02:01, Willy Wong <[log in to unmask]> wrote:
> >> Dear Dr. O'Mard,
> >> I appreciate that you are not listed under DSAM support.  However if you can gently point me to a forum or person who might know the answer to my question, that would be most appreciated.
> >>
> >> I am Mac user and have for a long period of time used the DSAM library along with rundsamsim in Matlab.  In an earlier version of OS X, I was able to compile from source without problems.  Since last year, I upgraded to Mountain Lion (10.8) and in the process forgot to keep the executable ams_ng.
> >>
> >> Currently I am now trying to recompile under Mountain Lion.  However the compilation doesn't like the pointer FFTArrayPtr found in (say)
> >>
> >> void    CreateNoiseBand_FFT(FFTArrayPtr fTInv, int plan, RandParsPtr randPars,
> >>                  int kLow, int kUpp);
> >>
> >> Here is one error message:
> >> In file included from UtFFT.c:43:
> >> ../../Include/UtFFT.h:95: error: expected ')' before 'fTInv'
> >>
> >> I can't for the life of me figure out what is the problem.  Do you happen to know by any chance where or from whom I might be able to seek the answer?
> >>
> >> Sincerely,
> >> Willy Wong
> >>
> >>
> >>
> >> --
> >> Willy Wong
> >> Dept. of Electrical and Computer Engineering
> >> University of Toronto, 10 King's College Rd.
> >> Toronto, Ontario, M5S 3G4, CANADA
> >> Tel:+1-416-978-8734  Fax:+1-416-946-8734
> >> Email: [log in to unmask]
> >> http://individual.utoronto.ca/willy
> >>
> >>
> >
>
>