utelle/wxchartdir

Struggling to get it going on MacOS.

tonyvsuk opened this issue · 8 comments

Hello,

I'm looking very closely at ChartDirector at the moment, I need a cross platform library.

I'm struggling to get it going on the Mac though. I've got wxWidgets installed, when I call configure to start the wxchartdir build, it doens't seem to find it.

Here is my configure line
../../../configure --enable-universal_binary=x86_64,arm64 --disable-shared --with-macosx-version-min=10.10 --with-wx-config=../../../../wxWidgets/build/osx/debug

and the output is here. It looks like it does not recognize that I've got v3.1.4 installed.

checking for wx-config... ../../../../wxWidgets/build/osx/debug
checking for wxWidgets version >= 3.0.0... no
configure: error: in /Users/tony/Documents/Vensim/Vensim/tpos/wxchartdir/build/osx/debug': configure: error: wxWidgets required but not detected. See config.log' for more details

Any help is more than welcome.

All the best,

Tony.

Schoolboy error, I should have used
../../../configure --enable-universal_binary=x86_64,arm64 --disable-shared --with-macosx-version-min=10.10 --with-wx-config=../../../../wxWidgets/build/osx/debug/wx-config

I missed the "wx-config" from the end of the confgure line.

Still struggling.

Configure does not recognise the --enable-universal_binary=x86_64,arm64 flag (not really surprised at this as the last commit on the source code was 3 years ago, before the M1 processor on the Mac).

--with-macosx-version-min=10.10 is also not recognised.

When I omit these from the configure call, I still get an error.

config.status: executing depfiles commands
config.status: error: in `wxchartdir/build/osx/debug':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).

I also tried using --disable-dependency-tracking which gives a successful end to the configure call. But then when I try and make, I get
make: ../../../admin/build-aux/install-sh: Permission denied
make: *** [cppdemo/.dirstamp] Error 1

Any help is more than welcome.

Tony.

I will look into this. Please allow a couple of days for this.

... the last commit on the source code was 3 years ago, before the M1 processor on the Mac ...

Well, actually there was no official new release of the ChartDirector library for Mac since then. However, I just checked that the Mac download changed silently. I will check that in more detail. However, my problem is that I don't have a Mac M1 system at hand for testing.

I do have a M1 Mac, and I'm more than happy to help if I can.

I also managed to get the crosshair demo graph embedded in my app as a test by including the wxchartviewer.cpp file from wxdemo/common, setting the include paths and copying the CharDirector dylib file to my build folder. I can document this if it helps others.

I do have a M1 Mac, and I'm more than happy to help if I can.

Thanks. Much appreciated.

I also managed to get the crosshair demo graph embedded in my app as a test by including the wxchartviewer.cpp file from wxdemo/common, setting the include paths and copying the CharDirector dylib file to my build folder. I can document this if it helps others.

I think this is a splendid idea. Maybe you could write a post in the "Discussions" section of the repository, maybe under the category "Show and tell".

make: ../../../admin/build-aux/install-sh: Permission denied

In the past I had issues with file permissions in some git repositories. AFAICT the executable bit is set for install-sh, so it should work, but maybe you should check it to be sure. And maybe you could turn on make's verbose mode, so that more detailed information is available what's going on.

I updated the ChartDirector libraries coming with wxChartDir to version 6.3. See commits 923f9d4 and 7330c6b.

Additionally I noticed that the file permissions of the scripts in the admin directory were only set to executable locally. I fixed that. Chances are that the problem you experienced is now gone. Please give it a try and let me know the results. Thanks in advance.

Sorry it's taken me so long. Had another go just now.

Here is my configure line,
../../../configure --enable-universal_binary=x86_64,arm64 --disable-shared --with-wx-config=../../../../wxWidgets/build/osx/debug/wx-config

During configure, I get one problem about not recognizing universal binary (this is needed in wxWidgets to generate code that runs on the Apple and Intel processors).
configure: WARNING: unrecognized options: --enable-universal_binary

When trying to make, I still get some errors. Looks like the --disable-shared flag for configure is being ignored.

Hope this helps.

Tony.

CXX cppdemo/cppdemo.o
CXX wxdemo/common/wxchartviewer.lo
CXXLD libwxcode_osx_cocoau_wxchartdir-3.1.la

*** Warning: Linking the shared library libwxcode_osx_cocoau_wxchartdir-3.1.la against the
*** static library /Users/tony/Documents/Vensim/Vensim/tpos/wxWidgets/build/osx/debug/lib/libwx_osx_cocoau_core-3.1.a is not portable!

*** Warning: Linking the shared library libwxcode_osx_cocoau_wxchartdir-3.1.la against the
*** static library /Users/tony/Documents/Vensim/Vensim/tpos/wxWidgets/build/osx/debug/lib/libwx_baseu-3.1.a is not portable!
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: .libs/libwxcode_osx_cocoau_wxchartdir-3.1.a(libwx_osx_cocoau_core-3.1.a) fat file for cputype (16777223) cpusubtype (3) is not an object file (bad magic number)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed
make: *** [libwxcode_osx_cocoau_wxchartdir-3.1.la] Error 1

During configure, I get one problem about not recognizing universal binary (this is needed in wxWidgets to generate code that runs on the Apple and Intel processors).
configure: WARNING: unrecognized options: --enable-universal_binary

Most likely the configuration file configure.ac (and maybe Makefile.am) needs to be adjusted to support this. Something like this.

When trying to make, I still get some errors. Looks like the --disable-shared flag for configure is being ignored.

I have to admit that I'm not an expert for the autoconf/automake toolchain. Invoking ./configure --help shows that option --disable-shared should be availabe and should work. No idea, why it doesn't work for you.

CXX cppdemo/cppdemo.o
CXX wxdemo/common/wxchartviewer.lo
CXXLD libwxcode_osx_cocoau_wxchartdir-3.1.la

*** Warning: Linking the shared library libwxcode_osx_cocoau_wxchartdir-3.1.la against the
*** static library /Users/tony/Documents/Vensim/Vensim/tpos/wxWidgets/build/osx/debug/lib/libwx_osx_cocoau_core-3.1.a is not portable!

Personally I always use shared libraries on Linux. That is, I have no experience with static wxWidgets libraries on Linux (or macOS). Sorry that I can't provide any helpful hints.