gfaviz icon indicating copy to clipboard operation
gfaviz copied to clipboard

Building on Apple M1

Open cartoonist opened this issue 2 years ago • 2 comments

I am trying to build gfaviz on Apple M1 (macos 12.0.1). I came across a couple of issues.

First, it complained about missing wchar.h header file -- the same issue as #65. Your suggestion mentioned there about defining CPLUS_INCLUDE_PATH worked for me and the compilation went on. Although, I still have no idea why one should define this environment variable as this header file is a part of the C standard library.

Then, it failed when building the bundled ogdf library. I reported the issue in the upstream library (ogdf/ogdf#75). They provided a patch which worked.

After patching, the compilation finished without any error. However, the main window is blank when the application launches: Screenshot 2021-12-10 at 16 33 02

~I should mention that I get lots of warning messages when linking which might be the reason~ UPDATE I fixed this by adding QMAKE_MACOSX_DEPLOYMENT_TARGET = 12.0 to the project file viz.pro. So, there is no such warnings anymore:

ld: warning: object file (obj/ogdf/GraphIO_ogml.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (obj/ogdf/GraphIO_graphml.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (obj/ogdf/Utils.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (obj/ogdf/GraphIO_gml.o) was built for newer macOS version (12.0) than being linked (11.0)
.
.
.
ld: warning: object file (obj/ogdf/FindKuratowskis.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (obj/ogdf/BoyerMyrvoldInit.o) was built for newer macOS version (12.0) than being linked (11.0)
ld: warning: object file (obj/ogdf/TileToRowsCCPacker.o) was built for newer macOS version (12.0) than being linked (11.0)

Do you have any idea what is going wrong here? Thanks!

P.S. here is some system information:

Clang: Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin21.1.0
Qt: stable 5.15.2 (installed by homebrew)

cartoonist avatar Dec 10 '21 15:12 cartoonist

Hi @cartoonist,

unfortunately I am not sure what is the problem. I am not a great MacOS expert... soon I should get at least a Mac to test it, and eventually see if I can understand the problem and find a fix. If you do, please tell me...

Giorgio

ggonnella avatar Dec 13 '21 11:12 ggonnella

Hi @ggonnella, I am also new to macos, so I am figuring things out right now. I will keep you posted if I make any progress.

cartoonist avatar Dec 13 '21 21:12 cartoonist