Closed joewiz closed 3 years ago
I just found a tap for qt4 at https://github.com/cartr/homebrew-qt4, so if qt4 is recommended, I could try this... But the error listed above doesn't directly point to the version of qt being a problem.
p.s. Here's the full results of the cmake command, with the dev warnings suppressed:
% cmake -Wno-dev -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/qt@5/5.15.2/lib -DCMAKE_INCLUDE_PATH=/usr/local/Cellar/qt@5/5.15.2/include -DQT_QMAKE_EXECUTABLE=/usr/local/Cellar/qt@5/5.15.2/bin/qmake -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt@5/5.15.2/lib/cmake .
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Checking pthreads with CFLAGS="" and LIBS="" -- yes
-- Configuring done
CMake Error: Target scantailor-universal Info.plist template "/Users/joe/workspace/scantailor-universal/src/app/src/packaging/osx/Info.plist.in" could not be found.
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Hi Joe ! It would be great to revive Mac Os distribution. I have no Mac, but long time ago I managed to build the sources on some old Mac Os image in ViryalBox. I think I still have this image. But it looks like build process for Mac is broken again. I should take a look into the sources in a next couple of days to fix paths for Mac.
As for instructions - they are very outdated. In fact Scan Tailor Universal migrated to Qt5 long time ago and can't be build with Qt4 anymore. So you may not try to build it with Qt4 - this is impossible. Qt 5.15 is fine.
That's great to hear, thank you, Alexander! I would be happy to perform any tests or provide any information that would help!
Great. I hope to finish Windows builds today (latest version deploys with libraries for jpeg2000, SVG icons support and couple example stylesheet files, so I have just refreshed my knowledge of buildscripts and how deeply I hate Windows OS) and will take a look on Mac just after that.
Hi, Ok, I was able to build the project on Mac OS 10.9 with Qt 5.8 The dmg image is uploaded to release: https://github.com/trufanov-nok/scantailor-universal/releases/tag/0.2.12 Pls let me know if it's working.
I'll submit the adjustments made to build the sources and fresh build instructions shortly.
One thing is worring me for now. I've STU on Mac wasn't able to open jp2 image (jpeg2000 extension) while openjp2 library is deployed and loaded properly. And it works well on Win and Linux. On the other side Mac OS 10.9 wasn't able to display such image in default image viewer. Could you please test if jp2 images can be opened with STU on your system? Probably me MacOS image is too old.
Just find some jp2 images, download them in some folder and try to create a new project, choosing this folder. I've tested with the image from this site: https://www.fnordware.com/j2k/jp2samples.html Direct link: https://www.fnordware.com/j2k/relax.jp2
Another problem is that it looks like clang compiler in MacOS 10.9 lacks OpenMP support and binary I generate won't be able to use some operations in parallel. But for STU 0.2.x it's not critical as only few operations are paralleled. That might become a problem for 0.3.x but looks like there is some magic that allows to get newer clang compiler for 10.9 machine. Will try it one day. So for now lack of OpenMP support is a know issue.
@trufanov-nok That's amazing! I downloaded v0.2.12 and tested with the jp2 image you suggested. When I added the folder containing the jp2 file, I got this error:
Other than this, in brief testing with a project using the previous release, everything appears to be working well.
Thank you so much, Alexander!
Is there anything else you'd like me to test? I'm on the current macOS, 11.2.3.
I've replaced the dmg file with a new one. Now jp2 image opening should be fixed. Could you confirm?
@trufanov-nok The build in the updated dmg file no longer throws an error when creating a new project with a folder containing the test jp2 image you suggested. But it presents me with a "Needs fixes" dialog, and I'm not sure why. Here's the progression of dialogs:
1. Selecting the folder containing the test jp2 image
2. The Needs Fixes dialog
(Note that the "Needs Fixes" title is obscured by what I guess is a QT rendering bug.)
3. The Needs Fixes dialog expanded
4. The Needs Fixes dialog, with my guessed values, and the Apply button now enabled
5. The resulting project
Is this the info you were hoping for? Should I try any other tests or provide any other info?
Well everything as expected except for the last picture. I have the same artifacts in my virtual macos image. Seems something is wrong with openjpeg lib or my integration of it on macos, bcs on Win and Linux there is no such artifacts. I'll ignore this problem for now as noone asked me for jp2 files support on any platform except Linux anyway.
Sounds good! I think the macOS builds are now working, then!
Ok, I've posted a brief notes on building current sources for MAC as a separate discussion: https://github.com/trufanov-nok/scantailor-universal/discussions/81 I'm closing this issue.
@trufanov-nok Thank you so much for keeping this fantastic utility, ScanTailor, alive! I have been using your scantailor-universal v0.2.8 since its release last year. It still works for me and was a lifesaver just today.
I noticed that recent releases haven't included builds for macOS, and that the section of the wiki article on building ScanTailor for macOS is labeled "outdated".
I thought I would try to create a build of the current master branch for macOS if possible, and I made some progress, but I encountered a couple of roadblocks in adapting it to my environment: macOS 11.2.3 (Big Sur) + Homebrew (as opposed to MacPorts).
As to prerequisites, I installed:
brew install cmake
installs v3.20.1 into/usr/local/Cellar/cmake/3.20.1
)brew install qt@5
installs v5.15.2 into/usr/local/Cellar/qt@5/5.15.2
)brew install boost
installs v1.75.0_2 into/usr/local/Cellar/boost/1.75.0_2
)brew install libxrender
installs v0.9.10 into/usr/local/Cellar/libxrender/0.9.10
)As to configuration, I cloned the current master branch of the repository, and from the cloned directory, I ran the following build command:
This yielded a number of "CMake Warning (dev)" messages and ultimately this error:
Indeed, I don't see the
Info.plist.in
file at the path shown in the error message:... but I do see one inside:
Is anyone successfully building ScanTailor on macOS, or does anyone have ideas for what to try? Thanks in advance!