yb85 / scantailor-advanced-osx

Homebrew formula and App bundler for Scantailor (Advanced)
149 stars 6 forks source link

Macos Monterey installing issue #17

Closed er-ac19 closed 1 year ago

er-ac19 commented 2 years ago

Hello, I am trying to install the app to M1 chip Monterey MacOS, but getting these errors. I am not good at these stuff, maybe I made a very basic mistake.

erayacar@faustaff-010-020-036-167 ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/yb85/scantailor-advanced-osx/HEAD/install.sh)" Cloning into '/var/folders/vx/q2pqys6j4lg9p6xv062j_w1r0000gn/T/tmp.fkwAatsg'... remote: Enumerating objects: 144, done. remote: Counting objects: 100% (81/81), done. remote: Compressing objects: 100% (65/65), done. remote: Total 144 (delta 28), reused 41 (delta 14), pack-reused 63 Receiving objects: 100% (144/144), 1.59 MiB | 6.11 MiB/s, done. Resolving deltas: 100% (51/51), done. ==> Downloading https://github.com/vigri/scantailor-advanced/archive/refs/tags/v Already downloaded: /Users/erayacar/Library/Caches/Homebrew/downloads/a6b0d9a04cd28f004db3852878d94f1739d54f2b37af2f040fb845c98741cf10--scantailor-advanced-1.0.18.tar.gz ==> Setting versioning tag to #release@1.0.18 (build 20220813) ==> cmake .. ==> make Last 15 lines from /Users/erayacar/Library/Logs/Homebrew/scantailor/02.make: [ 4%] Building CXX object src/foundation/CMakeFiles/foundation.dir/PerformanceTimer.cpp.o cd /tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build/src/foundation && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_TEST_DYN_LINK -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_XML_LIB -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build/src/foundation/foundation_autogen/include -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src/foundation -isystem /opt/homebrew/lib/QtCore.framework/Headers -iframework /opt/homebrew/lib -isystem /opt/homebrew/share/qt/mkspecs/macx-clang -isystem /opt/homebrew/lib/QtXml.framework/Headers -isystem /opt/homebrew/lib/QtGui.framework/Headers -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -fPIC -std=gnu++17 -MD -MT src/foundation/CMakeFiles/foundation.dir/PerformanceTimer.cpp.o -MF CMakeFiles/foundation.dir/PerformanceTimer.cpp.o.d -o CMakeFiles/foundation.dir/PerformanceTimer.cpp.o -c /tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src/foundation/PerformanceTimer.cpp /tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src/foundation/Proximity.cpp:59:34: error: no member named 'min_element' in namespace 'std' const Proximity* minPrx = std::min_element(prx, prx + 2);


[  5%] Building CXX object src/foundation/CMakeFiles/foundation.dir/GridLineTraverser.cpp.o
cd /tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build/src/foundation && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_TEST_DYN_LINK -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_XML_LIB -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build/src/foundation/foundation_autogen/include -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/build -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src -I/tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src/foundation -isystem /opt/homebrew/lib/QtCore.framework/Headers -iframework /opt/homebrew/lib -isystem /opt/homebrew/share/qt/mkspecs/macx-clang -isystem /opt/homebrew/lib/QtXml.framework/Headers -isystem /opt/homebrew/lib/QtGui.framework/Headers -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -fPIC -std=gnu++17 -MD -MT src/foundation/CMakeFiles/foundation.dir/GridLineTraverser.cpp.o -MF CMakeFiles/foundation.dir/GridLineTraverser.cpp.o.d -o CMakeFiles/foundation.dir/GridLineTraverser.cpp.o -c /tmp/scantailor-20220813-6864-1j91yja/scantailor-advanced-1.0.18/src/foundation/GridLineTraverser.cpp
1 error generated.
make[2]: *** [src/foundation/CMakeFiles/foundation.dir/Proximity.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  5%] Built target fix_orientation_autogen
make[1]: *** [src/foundation/CMakeFiles/foundation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  5%] Built target zones_autogen
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
yb85 commented 2 years ago

could you try to patch the formula to depend on boost@1.76 instead of boost. The last version of boost changed its importing mechanism which may have caused the error. If it fixes the issue, this should be reported to vigri's repo in order to add an explicit import of the min_element function

er-ac19 commented 2 years ago

I've changed the dependency to boost@1.76 but getting same error again.

homocomputeris commented 1 year ago
Last 15 lines from /Users/user/Library/Logs/Homebrew/scantailor/02.make:
                            ~~~~~^
[  4%] Built target fix_orientation_autogen
1 error generated.
make[2]: *** [src/foundation/CMakeFiles/foundation.dir/Proximity.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  4%] Built target deskew_autogen
[  4%] Building CXX object src/foundation/CMakeFiles/foundation.dir/PropertyFactory.cpp.o
cd /tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/build/src/foundation && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_TEST_DYN_LINK -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_XML_LIB -I/tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/build/src/foundation/foundation_autogen/include -I/tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/build -I/tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/src -I/tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/src/foundation -isystem /usr/local/lib/QtCore.framework/Headers -iframework /usr/local/lib -isystem /usr/local/share/qt/mkspecs/macx-clang -isystem /usr/local/lib/QtXml.framework/Headers -isystem /usr/local/lib/QtGui.framework/Headers -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -fPIC -fPIC -std=gnu++17 -MD -MT src/foundation/CMakeFiles/foundation.dir/PropertyFactory.cpp.o -MF CMakeFiles/foundation.dir/PropertyFactory.cpp.o.d -o CMakeFiles/foundation.dir/PropertyFactory.cpp.o -c /tmp/scantailor-20221001-14465-3n3bhn/scantailor-advanced-1.0.18/src/foundation/PropertyFactory.cpp
[  4%] Built target select_content_autogen
[  4%] Built target page_split_autogen
make[1]: *** [src/foundation/CMakeFiles/foundation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  4%] Built target page_layout_autogen
[  4%] Built target zones_autogen
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!
homocomputeris commented 1 year ago

With boost 1.76 I get

user@users-MacBook-Pro ~/scantailor-advanced-osx (git)-[master] % export LDFLAGS="-L/usr/local/opt/boost@1.76/lib"
user@users-MacBook-Pro ~/scantailor-advanced-osx (git)-[master] % export CPPFLAGS="-I/usr/local/opt/boost@1.76/include"
user@users-MacBook-Pro ~/scantailor-advanced-osx (git)-[master] % brew install --formula --HEAD ./scantailor.rb   
==> Cloning https://github.com/vigri/scantailor-advanced.git
Updating /Users/user/Library/Caches/Homebrew/scantailor--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at d799b8a Merge pull request #19 from mirusu400/master
==> Setting versioning tag to #master@HEAD-d799b8a (build 20221015)
==> cmake ..
==> make
Last 15 lines from /Users/user/Library/Logs/Homebrew/scantailor/02.make:
/tmp/scantailor-20221015-25151-16ekvlb/src/foundation/Proximity.cpp:59:34: error: no member named 'min_element' in namespace 'std'
  const Proximity* minPrx = std::min_element(prx, prx + 2);
                            ~~~~~^
1 error generated.
make[2]: *** [src/foundation/CMakeFiles/foundation.dir/Proximity.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  4%] Built target fix_orientation_autogen
[  4%] Built target page_split_autogen
[  4%] Built target deskew_autogen
[  4%] Built target select_content_autogen
make[1]: *** [src/foundation/CMakeFiles/foundation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  4%] Built target page_layout_autogen
[  4%] Built target zones_autogen
make: *** [all] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
brew install --formula --HEAD ./scantailor.rb  27.08s user 12.69s system 225% cpu 17.597 total
Rosti2022 commented 1 year ago

Is there any update on this? The issue still persists when trying to install it on Apple Silicon. Thanks!

bfjarvis commented 1 year ago

Just tried installing today and using the "bleeding edge" install command with HomeBrew lead to a clean install (i.e., brew install --formula --HEAD ./scantailor.rb). This was on an M1 Max Macbook Pro.

rostam2000 commented 1 year ago

No such joy for me unfortunately, the error persists. Could you please state what versions of boost and other dependencies you have installed? Thanks

yb85 commented 1 year ago

I patched the formula to accomodate for the missing header in Proximity.h. This is temporary and should be fixed in the original scantailor repo

If it fixes your issue, please report so that i close this ticket

yb85 commented 1 year ago

Since it runs properly on my fresh install of MacoOS 10.13 (ventura) with an arm64e processor (M1), i close the issue without further information

My compilation output :

❯ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/yb85/scantailor-advanced-osx/HEAD/install.sh)"
Cloning into '/var/folders/59/gyw76y5d7pb4yxkv11tqq5v40000gn/T/tmp.9IbSTTzW'...
remote: Enumerating objects: 147, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 147 (delta 30), reused 40 (delta 14), pack-reused 63
Receiving objects: 100% (147/147), 1.59 MiB | 9.60 MiB/s, done.
Resolving deltas: 100% (53/53), done.
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).

==> Downloading https://github.com/vigri/scantailor-advanced/archive/refs/tags/v1.0.18.tar.gz
==> Downloading from https://codeload.github.com/vigri/scantailor-advanced/tar.gz/refs/tags/v1.0.18
##O#-#
==> Setting versioning tag to #release@1.0.18 (build 20221029)
==> cmake ..
==> make
==> make install
🍺  /opt/homebrew/Cellar/scantailor/1.0.18: 15 files, 4.8MB, built in 1 minute 5 seconds
==> Running `brew cleanup scantailor`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
[SCANTAILOR INSTALLER]  Succesfuly installed SCANTAILOR, done.

❯ neofetch
                    'c.          ###########################
                 ,xNMM.          ---------------------------
               .OMMMMo           OS: macOS 13.0 22A380 arm64
               OMMM0,            Host: MacBookAir10,1
     .;loddo:' loolloddol;.      Kernel: 22.1.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 11 hours, 50 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 69 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: fish 3.5.1
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1440x900
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: #####
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: ############
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1
       .cooc,.    .,coo:.        Memory: 1363MiB / 8192MiB