Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations don't display properly #33

Closed
chuffman377 opened this issue Aug 23, 2019 · 57 comments
Closed

Annotations don't display properly #33

chuffman377 opened this issue Aug 23, 2019 · 57 comments

Comments

@chuffman377
Copy link

chuffman377 commented Aug 23, 2019

TL;DR: Pango 1.44.4 introduces a regression; with Pango 1.42.4, annotations work:

brew unlink pango
brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
brew switch pango 1.42.4_2
brew pin pango # skip upgrades from 'brew upgrade'

I've used AMC in the past and have just reinstalled the program using homebrew. I've encountered a new problem I've not seen before. When I "Annotate Papers," I can see that the annotations are correct, but they are not displayed properly. They are squished so that each letter or number is almost on top of one another. Below is a screenshot.

image

I'm not sure what you'd like to see to help solve my problem. Here is some text from the terminal in which AMC was launched:

2019-08-23 10:34:19.045 perl[1923:14056] IMKInputSession presentFunctionRowItemTextInputViewWithEndpoint:completionHandler: : [self textInputContext]=0x7f8283e04950 *NO* NSRemoteViewController to client, NSError=Error Domain=NSCocoaErrorDomain Code=4099 "The connection from pid 0 was invalidated from this process." UserInfo={NSDebugDescription=The connection from pid 0 was invalidated from this process.}, com.apple.inputmethod.EmojiFunctionRowItem
WARNING: You don't seem to have a mime-info database. The
shared-mime-info package is available from http://freedesktop.org/ .

Also, I'm getting this error in the Marking tab, which may be unrelated:
image

@maelvls
Copy link
Owner

maelvls commented Aug 24, 2019

Hi! Thank you for using this formula!

I think I also encountered this issue at some point. Back then, I remember I had to set the font size to a smaller one. But I don't think it is the same problem as yours. 😬

I'll take a look at https://project.auto-multiple-choice.net/projects/auto-multiple-choice/boards/2 to see if this issue is known.

Regarding the mismatch, that's an easy problem to solve (usually). It should be fixed with

sudo auto-multiple-choice latex-link remove
sudo auto-multiple-choice latex-link

@chuffman377
Copy link
Author

I searched my computer, and I can't find the automultiplechoice.sty file version 1.4. How can I get that? I tried the commands you suggested and got the following:

sudo auto-multiple-choice latex-link remove
No link to remove.
sudo auto-multiple-choice latex-link
The style file is already accessible:
/usr/local/texlive/2017/texmf-dist/tex/latex/AMC/automultiplechoice.sty

At first I didn't think this was related to my problem, but perhaps if AMC relies on the sty file to make the annotated pdf, this is really the source of my issue.

@technofeliz
Copy link

Same problem here. I don't think it is related to AMC itself, it looks like the issue occured after a brew update.
For the moment, I am using the osx version to create the qcm, scan the results, and a linux version in a virualized ubuntu to create the annotations in PDF. Then I move back the PDF files to my osx version to send mails to students. But the whole process is a bit annoying...

Which topic exactly in the https://project.auto-multiple-choice.net/projects/auto-multiple-choice/boards/2 page should we look for ?

@maelvls
Copy link
Owner

maelvls commented Aug 25, 2019

I didn't find anything interesting in the official forums. I'll force a 'rebuild' of the bottles with the newest updates from upstream Homebrew, hoping that it will fix things

@maelvls maelvls mentioned this issue Aug 25, 2019
@maelvls
Copy link
Owner

maelvls commented Aug 25, 2019

Looks like someone had the same problem (here). I guess it's you, @technofeliz 😅

@chuffman377
Copy link
Author

Do I need to uninstall/install AMC using Homebrew to see if this helps? How do I do that?

@technofeliz
Copy link

technofeliz commented Aug 26, 2019

Still not working for me :

I did an brew update, upgrade (as I usely do to update homebrew packages) :
brew update && brew upgrade && brew cleanup

But it was still not working. So I use the "brute force" mode (reinstall all dependecies of AMC) with this command :
brew reinstall $(brew deps auto-multiple-choice-devel)

Still not working.
During re-installation, I got this warning message :

==> Reinstalling opencv
==> Downloading https://homebrew.bintray.com/bottles/opencv-4.1.0_3.mojave.bottle.1.tar.gz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/77f06b80d6cdf20213a4522f81bf23f959af65086404bafeae3c53c837e13c74--opencv-4.1.0_3.mojave.bottle.1.tar.gz
==> Pouring opencv-4.1.0_3.mojave.bottle.1.tar.gz
**Warning**: opencv dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
🍺  /usr/local/Cellar/opencv/4.1.0_3: 729 files, 240.0MB

Could it be related to the issue ?

Looks like someone had the same problem (here). I guess it's you, @technofeliz 😅

Damned... you got me... 😁

@maelvls
Copy link
Owner

maelvls commented Aug 26, 2019

Regarding the C++ mismatch, I had this warning before (I guess it doesn't affect us but not sure).

Reinstalling Homebrew won't really help I think 🙁. I'm pretty sure the issue come from Homebrew dependencies that are 'off' (I didn't recompile/update the bottle for a while).

I have a temporary solution, could you try rebuilding from source:

brew install --build-from-source maelvls/amc/auto-multiple-choice

I can't figure out a way to make Travis work again (it breaks every month...) so I can't re-bottle it for now, meaning that the binary is outdated (this is my guess). I spent like 3 hours yesterday trying to fix Travis again 😵

Can you tell me if it worked?

@chuffman377
Copy link
Author

chuffman377 commented Aug 26, 2019

I'm new to homebrew, so maybe I'm doing something wrong that's really basic, but when I try to install in a combination of any of the following ways

  • regular or build-from-source
  • maelvls or maelvalais
  • auto-multiple-choice or auto-multiple-choice-devel

I am getting the following error message...

Error: Formulae found in multiple taps: 
       * maelvalais/amc/auto-multiple-choice-devel
       * maelvls/amc/auto-multiple-choice-devel

Please use the fully-qualified name (e.g. maelvalais/amc/auto-multiple-choice-devel) to refer to the formula.

When I add the "-devel", to auto-multiple-choice with the installation code, I get the same message but without the -devel suggestions.

Also, I noticed my Xcode was out of date, so I tried upgrading that, but won't be able to tell if that was a contributing factor to the original problem until I can install AMC and test it.

==> Installing auto-multiple-choice from maelvalais/amc
Warning: Your Xcode (9.0.1) is outdated.
Please update to Xcode 9.2 (or delete it).
Xcode can be updated from the App Store.

@maelvls
Copy link
Owner

maelvls commented Aug 27, 2019

Oh, sorry for that... I changed my username from maelvalais to maelvls, confuses everybody 🙁

Regarding auto-multiple-choice-devel, it was used in pre-1.4.0 but right now it has the same version as auto-multiple-choice, i.e., 1.4.0.

To fix the issue with Formulae found in multiple taps:, can you do

brew untap maelvalais/amc
brew tap maelvls/amc

Can you run brew install --build-from-source maelvls/amc/auto-multiple-choice after that?

@chuffman377
Copy link
Author

chuffman377 commented Aug 27, 2019

Sadly, no improvement after building from source. I got the following warning messages...
After installation:

Warning: maelvls/amc/auto-multiple-choice dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.

GNU "make" has been installed as "gmake".
If you need to use it as "make", you can add a "gnubin" directory
to your PATH from your bashrc like:

    PATH="/usr/local/opt/make/libexec/gnubin:$PATH"

After attempting to annotate:
WARNING: You don't seem to have a mime-info database. The
shared-mime-info package is available from http://freedesktop.org/ .

I'm assuming these are unrelated to the issue. Any other suggestions?

@chuffman377
Copy link
Author

After attempting to annotate:
WARNING: You don't seem to have a mime-info database. The
shared-mime-info package is available from http://freedesktop.org/ .

I got rid of this warning using brew install shared-mime-info
No effect on the annotation issue.

@maelvls
Copy link
Owner

maelvls commented Aug 28, 2019

Seems like these warnings aren't related to the annotation process 😞

So you tried recompiling with the newest Homebrew dependencies but it didn't fix the issue... at this point, I have no clue on how to fix it 🙁

@technofeliz
Copy link

technofeliz commented Aug 29, 2019

Hello,

Same result here :
brew reinstall --build-from-source maelvls/amc/auto-multiple-choice-devel
=> annotation issue still there.

I even recompiled every single dependency with the same option :
brew reinstall --build-from-source $(brew deps auto-multiple-choice-devel)
(took a while...) but infortunately it didn't change anything for the annotations.

Which library do you think is responsible for the "annotation issue" behaviour ?

During the long process of the second test (recompile everything with build-from-source option), i got this warning :

Warning: <package-name> dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
  • on ceres-solver :
  • on opencv :
  • on suite-sparse
  • and of course on maelvalais/amc/auto-multiple-choice-devel
  • in addition : gnutls couldn't be build from source (no sources available ?)
  • and qt took so looooong to compile, that I stopped it and reinstall normally...

Are any of these packages possibly responsible of the annotation bug ?
If there a way to know which package is responsable and eventually import an old version of it ?
Any other clue ?

@technofeliz
Copy link

technofeliz commented Aug 29, 2019

oh, I've juste realised I still use maelvalais/amc/auto-multiple-choice-devel...
devel version...
and maelvalais user name instead of maelvls...

I will test again with following the new howto...

[EDIT] nope... same result, issue is still there...

@chuffman377
Copy link
Author

chuffman377 commented Aug 29, 2019

I still have not had success either. I tried fixing a few things to see if there was an impact. I was able to get the correct version of the automultiplechoice.sty file (1.4), which got rid of some warning messages but did not fix the annotation issue. Other warnings I've noticed along the way (probably unrelated):

in the preparation tab when I "update documents," in the terminal I see:

Use of uninitialized value in string eq at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/AMC/Config.pm line 652.

similarly when I set the file with student info in the marking window I see:

Use of uninitialized value $both in concatenation (.) or string at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/lib/AMC/perl/AMC-gui.pl line 3626.
Use of uninitialized value in string ne at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/AMC/DataModule/association.pm line 290.

I get no errors, warnings or text in the terminal when I do the annotation step, and these other steps work fine, so the messages are probably unrelated.

I may have to abandon this installation procedure (SO SAD!) and go back to the macports installation, but I've had other issues with that as well. I'm not sure where to get help with those. Maybe you could point me in the right direction?

Macports problem: When I launch AMC the first time, it works as expected. The second time I launch from the terminal, the font size in the XQuartz window is so large that the window goes off the screen, and shrinking the window size has no effect. In the terminal, I see: "gtk_box_gadget_distribute: assertion 'size >=0' failed in GtkNotebook"
If I reboot the computer, AMC launches normally (XQuartz works as expected). I've tried googling this error message, but I'm not understanding how to fix the problem.

Thank you both @technofeliz and @maelvls.

@technofeliz
Copy link

Thanks for the feedback.
No way I'm going back to Macport... 😁

Is there a way to do a "rollback" (or soft of) in HomeBrew ? It would be very usefull after a brew update which is breaking AMC to go back to the previous installation.
Or maybe an utility software for OSX to set a "checkpoint" in HomeBrew where we can "go back" in case anything brakes after an update ?

@maelvls
Copy link
Owner

maelvls commented Aug 30, 2019

It is possible to 'rollback' using Homebrew, two cases:

  • if you still have some old versions:

    $ brew ls --versions auto-multiple-choice
    auto-multiple-choice 1.3.1_1
    auto-multiple-choice 1.4.0_2
    auto-multiple-choice 1.4.0_3
    
    $ brew switch auto-multiple-choice 1.3.1_1
    
  • if you didn't have older versions installed previously:

    1. find the commit revision (here) where the version was bumped (it must mention update bottle. so that you get the commit with the right bottle
    2. for example auto-multiple-choice: update 1.4.0_1 bottle., open the commit, click 'View File', click 'Raw' and then copy paste the url:
      brew install https://raw.githubusercontent.com/maelvls/homebrew-amc/b9bff1e415085a763ae9003f3311f853dbcb6764/auto-multiple-choice.rb
      
      This is going to download the bottle at this commit, but since this bottle used the dependencies (opencv for example) back then, it will probably break auto-multiple-choice. What I would recommend is to use --build-from-source instead, and this time it will definitely work:
      brew install --build-from-source https://raw.githubusercontent.com/maelvls/homebrew-amc/b9bff1e415085a763ae9003f3311f853dbcb6764/auto-multiple-choice.rb
      

What's weird is that the Annotate.pl seem to work on the AMC's CI 🤔 Maybe it's using an external tool and we don't have the right version

@maelvls
Copy link
Owner

maelvls commented Aug 30, 2019

Ooohhh wait, Annotate.pl is using AMC-buildpdf which is an actualy binary relying on opencv, pango, cairo, poppler, glib... so many things that could break things!

% otool -L /usr/local/Cellar/auto-multiple-choice/1.4.0_3/lib/AMC/exec/AMC-buildpdf
/usr/local/Cellar/auto-multiple-choice/1.4.0_3/lib/AMC/exec/AMC-buildpdf:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
	/usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)
	/usr/local/opt/pango/lib/libpango-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)
	/usr/local/opt/poppler/lib/libpoppler-glib.8.dylib (compatibility version 8.0.0, current version 8.12.0)
	/usr/local/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 6001.0.0, current version 6001.3.0)
	/usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 6001.0.0, current version 6001.3.0)
	/usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
	/usr/local/opt/cairo/lib/libcairo.2.dylib (compatibility version 11603.0.0, current version 11603.0.0)
	/usr/local/opt/opencv/lib/libopencv_gapi.4.1.dylib (compatibility version 4.1.0, current version 4.1.0)
	/usr/local/opt/opencv/lib/libopencv_stitching.4.1.dylib (compatibility version 4.1.0, current version 4.1.0)
	/usr/local/opt/opencv/lib/libopencv_aruco.4.1.dylib (compatibility version 4.1.0, current version 4.1.0)
	/usr/local/opt/opencv/lib/libopencv_bgsegm.4.1.dylib (compatibility version 4.1.0, current version 4.1.0)
	/usr/local/opt/opencv/lib/libopencv_bioinspired.4.1.dylib (compatibility version 4.1.0, current version 4.1.0)

I'll be looking at brew log opencv to see what happend, apparently the move to opencv 4.1 happened on 13 April 2019.

@technofeliz
Copy link

technofeliz commented Aug 30, 2019

It is possible to 'rollback' using Homebrew, two cases:

  • if you still have some old versions:
    $ brew ls --versions auto-multiple-choice
    

Hello,

Very interesting informations about how to rollback to a previous revision. Thanks.
Unfortunately, I think I did a "brew cleanup" recently... argh... so long for the switch to a previous version...
But in the future I will stop using the "cleanup" command before checking if AMC is broken or not...

 brew install --build-from-source https://raw.githubusercontent.com/maelvls/homebrew-amc/b9bff1e415085a763ae9003f3311f853dbcb6764/auto-multiple-choice.rb

Thanks. I will give a try.

What's weird is that the Annotate.pl seem to work on the AMC's CI 🤔 Maybe it's using an external tool and we don't have the right version

That's a good question. Which fck**###@ library update broke my AMC ??? 😁

@chuffman377
Copy link
Author

chuffman377 commented Sep 3, 2019

First I used

brew unlink auto-multiple-choice

Then, as per @maelvls suggestion, I used

brew install --build-from-source https://raw.githubusercontent.com/maelvls/homebrew-amc/b9bff1e415085a763ae9003f3311f853dbcb6764/auto-multiple-choice.rb

to install version 1.4.0_1. I still had the same issue as before with annotations.

So then...

brew unlink auto-multiple-choice
brew install --build-from-source https://raw.githubusercontent.com/maelvls/homebrew-amc/cef4a21c3659fa0cf2818efb80d6e21c3b4ea6e3/auto-multiple-choice.rb

to install version 1.3.0.2199_2.

This did not install. I got the following errors:

AMC-detect.cc:40:10: fatal error: 'opencv2/core/core.hpp' file not found
#include "opencv2/core/core.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile:124: AMC-detect] Error 1
make: *** Waiting for unfinished jobs....
In file included from AMC-buildpdf.cc:23:
./buildpdf.cc:42:10: fatal error: 'opencv2/core/core.hpp' file not found
#include "opencv2/core/core.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile:127: AMC-buildpdf] Error 1

I got the same errors when attempting to install version 1.4.0.

What is the last stable version to use?

@maelvls
Copy link
Owner

maelvls commented Sep 3, 2019

Argh, this is related to Homebrew having versions of everything moving forward; when you do brew install --build-from-source it's going to use today's opencv version, which moved opencv2/core/core.hpp to another place.

I think there is only one way: tell AMC's main maintainer about the issue of opencv 4.1 (that's my guess) and try to come up with a fix on https://gitlab.com/jojo_boulix/auto-multiple-choice

I'm so sorry not being able to fix this issue for now ☹️ I'm 95% sure it's related to dependencies upgrade having broken AMC-buildpdf and there is no 'clean' way of going back to older versions (except maybe to use opencv 3 instead of 4).

As an experiment with opencv@3 instead of opencv 4.1, can you try the 1.4.0_opencv3:

brew install --build-from-source https://raw.githubusercontent.com/maelvls/homebrew-amc/d2a5891eacef2bd62ed6259b460d4dea76363ff4/auto-multiple-choice.rb

I just tried it and sadly it doesn't work as (apparently) we rely on opencv 4 headers:

==> Installing auto-multiple-choice
==> Downloading https://gitlab.com/jojo_boulix/auto-multiple-choice/uploads/ae5e224c2490bfcdec676a32b1b476f6/aut
######################################################################## 100.0%
==> make AMCCONF=brew PREFIX=/usr/local/Cellar/auto-multiple-choice/1.4.0_opencv3 LIBS_PREFIX=/usr/local
Last 15 lines from /Users/mvalais/Library/Logs/Homebrew/auto-multiple-choice/01.make:
  "cv::rectangle(cv::_InputOutputArray const&, cv::Point_<int>, cv::Point_<int>, cv::Scalar_<double> const&, int, int, int)", referenced from:
      calage(cv::Mat, cv::Mat, double, double, double, double, double, int, double*, double*, cv::Mat&, int) in AMC-detect-8fe42d.o
  "cv::threshold(cv::_InputArray const&, cv::_OutputArray const&, double, double, int)", referenced from:
      load_image(cv::Mat&, char*, int, double, int) in AMC-detect-8fe42d.o
  "cv::Mat::copyTo(cv::_OutputArray const&) const", referenced from:
      _main in AMC-detect-8fe42d.o
  "typeinfo for cv::Exception", referenced from:
      GCC_except_table3 in AMC-detect-8fe42d.o
      GCC_except_table22 in AMC-detect-8fe42d.o
      GCC_except_table23 in AMC-detect-8fe42d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:130: AMC-detect] Error 1
make[1]: Leaving directory '/private/tmp/auto-multiple-choice-20190904-25971-lvi8t0/auto-multiple-choice-1.4.0'
make: *** [Makefile:123: all_precomp] Error 2

@technofeliz
Copy link

Thanks a lot for all the investigations.

There was an opencv update recently but that didn't change anything to the annotation bug in AMC : https://formulae.brew.sh/formula/opencv
https://github.com/Homebrew/homebrew-core/blob/master/Formula/opencv.rb

I'm not sure to understand : is this only a Mac OSX bug ?
Why is it working in the Linux version of AMC ? Not the same libraries ?

@chuffman377
Copy link
Author

When I went back to installation with MacPorts, I did not have the annotation issue, so it seems it is an issue only with Homebrew installation, rather than a platform-specific problem. That's why I've hesitated to post the issue elsewhere. However, I just spoke to a colleague who is new to AMC and installed with Homebrew on a Mac and had no issues! He is using Mojave, and I'm using Sierra (10.12.6), so maybe that's the issue?!?! @technofeliz - what OSX are you using??

@technofeliz
Copy link

OSX Mojave 10.14.6
And I still have the issue.
Interesting...
Do you think it's worth testing a complete uninstallation of Homebrew and a full new install from scratch (could take a while...) ?
How did you colleague install AMC ? Simply with a
brew install maelvls/amc/auto-multiple-choice ?

@maelvls
Copy link
Owner

maelvls commented Sep 5, 2019

@chuffman377 What version of AMC-homebrew does your colleague have, and what are the dependencies versions also?

I think we should take a look at which versions of dependencies (opencv, pango, cairo, poppler, glib) it's working on for which it's not working. We can do that with:

brew deps auto-multiple-choice | xargs brew ls --versions | pbcopy

pbcopy will copy the result to your paste bin. You can paste it in a github comment as:

<details>
<pre>
paste here
</pre>
</details>
adwaita-icon-theme 3.32.0
aom 1.0.0
atk 2.32.0_1
cairo 1.16.0_2
cmake 3.14.5
eigen 3.3.7
ffmpeg 4.1.4 4.1.4_1
flac 1.3.2_1
fontconfig 2.13.1
freetype 2.10.1
frei0r 1.6.1
fribidi 1.0.5
gcc 9.2.0 9.1.0
gdbm 1.18.1
gdk-pixbuf 2.38.1_1
gettext 0.20.1
gflags 2.2.2
giflib 5.1.4_1
glib 2.60.5 2.60.7
glog 0.4.0
gmp 6.1.2_2
gnutls 3.6.9 3.6.8
gobject-introspection 1.60.2_1
graphite2 1.3.13
gsettings-desktop-schemas 3.32.0
gtk+3 3.24.10
harfbuzz 2.5.3 2.6.1
hicolor-icon-theme 0.17
icu4c 64.2
ilmbase 2.3.0
imagemagick@6 6.9.10-62 6.9.10-53
isl 0.21
jasper 2.0.16_1
jpeg 9c
lame 3.100
leptonica 1.78.0
libass 0.14.0_1
libbluray 1.1.2 1.1.1
libcroco 0.6.13_1
libepoxy 1.5.3
libevent 2.1.10 2.1.11
libffi 3.2.1
libidn2 2.2.0_1
libmpc 1.1.0
libogg 1.3.3
libpng 1.6.37
librsvg 2.44.15 2.44.14_1
libsamplerate 0.1.9_1
libsndfile 1.0.28
libsoxr 0.1.3
libtasn1 4.13 4.14
libtiff 4.0.10_1
libtool 2.4.6_1
libunistring 0.9.10
libvorbis 1.3.6
libvpx 1.8.0 1.8.1
little-cms2 2.9
lzo 2.10
mpfr 4.0.2
netpbm 10.73.27
nettle 3.4.1
nspr 4.22 4.21
nss 3.45 3.46
numpy 1.16.4_1 1.16.4
openblas 0.3.7 0.3.6_1
opencore-amr 0.1.5
opencv 4.1.0_2
openexr 2.3.0
openjpeg 2.3.1
openssl 1.0.2s
openssl@1.1 1.1.1c
opus 1.3.1
p11-kit 0.23.16.1
pango 1.42.4_2 1.44.5
pcre 8.43
perl 5.30.0
pixman 0.38.4
pkg-config 0.29.2
poppler 0.74.0 0.80.0 0.76.1
python 3.7.4
python@2 2.7.16 2.7.16_1
qpdf 8.4.2 9.0.0
qt 5.13.0
readline 8.0.0_1
rtmpdump 2.4+20151223
rubberband 1.8.2_1
sdl2 2.0.9_1 2.0.10
snappy 1.1.7_1
speex 1.2.0
sqlite 3.29.0
tbb 2019_U8
tesseract 4.1.0 4.0.0_1
theora 1.1.1
unbound 1.9.3 1.9.2
webp 1.0.3
x264 r2917
x265 3.1.2 3.0
xvid 1.3.5
xz 5.2.4

So in my case (I updated Homebrew pretty recently):

  • opencv 4.1.0_2
  • cairo 1.16.0_2
  • poppler 0.80.0 (I installed auto-multiple-choice today so I'm sure it's the latest version of everything)
  • pango 1.44.5

@chuffman377
Copy link
Author

Do you think it's worth testing a complete uninstallation of Homebrew and a full new install from scratch (could take a while...) ?

I have already tried this and it did not make a diffference.

How did you colleague install AMC ? Simply with a
brew install maelvls/amc/auto-multiple-choice ?

Yes, this is the command he used. He's installed it on a laptop and it installed auto-multiple-choice 1.4.0_3. He also installed it on a desktop and it installed auto-multiple-choice 1.4.0_2. Both are functioning.

I think we should take a look at which versions of dependencies (opencv, pango, cairo, poppler, glib) it's working on for which it's not working.

The details for each installation are below, but I also put both in a spreadsheet for easy comparison. I highlighted the differences. There are a lot. A theme I've detected is that for every difference, my "not working" installation is using newer versions of the dependency than the "working" installation of my colleague.

My "not working" installation on Sierra:

adwaita-icon-theme 3.32.0
aom 1.0.0
atk 2.32.0_1
cairo 1.16.0_2
ceres-solver 1.14.0_8
cmake 3.15.2
eigen 3.3.7
ffmpeg 4.1.4_1
flac 1.3.2_1
fontconfig 2.13.1
freetype 2.10.1
frei0r 1.6.1
fribidi 1.0.5
gcc 9.2.0
gdbm 1.18.1
gdk-pixbuf 2.38.1_1
gettext 0.20.1
gflags 2.2.2
giflib 5.1.4_1
glib 2.60.6 2.60.7
glog 0.4.0
gmp 6.1.2_2
gnutls 3.6.9
gobject-introspection 1.60.2_1
graphite2 1.3.13
gsettings-desktop-schemas 3.32.0
gtk+3 3.24.10
harfbuzz 2.6.1
hicolor-icon-theme 0.17
icu4c 64.2
ilmbase 2.3.0
imagemagick@6 6.9.10-62
isl 0.21
jasper 2.0.16_1
jpeg 9c
lame 3.100
leptonica 1.78.0
libass 0.14.0_1
libbluray 1.1.2
libcroco 0.6.13_1
libepoxy 1.5.3
libevent 2.1.11
libffi 3.2.1
libidn2 2.2.0_1
libmpc 1.1.0
libogg 1.3.3
libpng 1.6.37
librsvg 2.44.14_1 2.44.15
libsamplerate 0.1.9_1
libsndfile 1.0.28
libsoxr 0.1.3
libtasn1 4.14
libtiff 4.0.10_1
libtool 2.4.6_1
libunistring 0.9.10
libvorbis 1.3.6
libvpx 1.8.1
little-cms2 2.9
lzo 2.10
metis 5.1.0
mpfr 4.0.2
netpbm 10.73.27
nettle 3.4.1
nspr 4.22
nss 3.45 3.46
numpy 1.16.4_1
openblas 0.3.7
opencore-amr 0.1.5
opencv 4.1.1 4.1.1_1
openexr 2.3.0
openjpeg 2.3.1
openssl 1.0.2s
openssl@1.1 1.1.1c
opus 1.3.1
p11-kit 0.23.16.1
pango 1.44.5
pcre 8.43
perl 5.30.0
pixman 0.38.4
pkg-config 0.29.2
poppler 0.80.0
python 3.7.4
python@2 2.7.16 2.7.16_1
qpdf 8.4.2 9.0.0
qt 5.13.0
readline 8.0.0_1
rtmpdump 2.4+20151223
rubberband 1.8.2_1
sdl2 2.0.10
snappy 1.1.7_1
speex 1.2.0
sqlite 3.29.0
suite-sparse 5.4.0_1
tbb 2019_U8
tesseract 4.1.0
theora 1.1.1
unbound 1.9.2_1 1.9.3
webp 1.0.3
x264 r2917
x265 3.1.2
xvid 1.3.5
xz 5.2.4

My colleague's "working" installation on Mojave (AMC auto-multiple-choice 1.4.0_2):

adwaita-icon-theme 3.32.0
aom 1.0.0
atk 2.32.0
cairo 1.16.0
eigen 3.3.7
ffmpeg 4.1.3_1
flac 1.3.2_1
fontconfig 2.13.1
freetype 2.10.0
frei0r 1.6.1
fribidi 1.0.5
gcc 9.1.0
gdbm 1.18.1
gdk-pixbuf 2.38.1
gettext 0.19.8.1
gflags 2.2.2
giflib 5.1.4_1
glib 2.60.2
glog 0.4.0
gmp 6.1.2_2
gnutls 3.6.7.1
gobject-introspection 1.60.1
graphite2 1.3.13
gsettings-desktop-schemas 3.32.0
gtk+3 3.24.8
harfbuzz 2.4.0_1
hicolor-icon-theme 0.17
icu4c 64.2
ilmbase 2.3.0
imagemagick@6 6.9.10-43
isl 0.21
jasper 2.0.16_1
jpeg 9c
lame 3.100
leptonica 1.78.0
libass 0.14.0_1
libbluray 1.1.1
libcroco 0.6.13
libepoxy 1.5.3
libevent 2.1.8
libffi 3.2.1
libmpc 1.1.0
libogg 1.3.3
libpng 1.6.37
librsvg 2.44.13
libsamplerate 0.1.9_1
libsndfile 1.0.28
libsoxr 0.1.3
libtasn1 4.13
libtiff 4.0.10_1
libtool 2.4.6_1
libunistring 0.9.10
libvorbis 1.3.6
libvpx 1.8.0
little-cms2 2.9
mpfr 4.0.2
netpbm 10.73.26
nettle 3.4.1
nspr 4.21
nss 3.43
numpy 1.16.3_1
openblas 0.3.6_1
opencore-amr 0.1.5
opencv 4.1.0_2
openexr 2.3.0
openjpeg 2.3.1
openssl 1.0.2r
opus 1.3.1
p11-kit 0.23.15
pango 1.42.4_1
pcre 8.43
perl 5.28.1
pixman 0.38.4
pkg-config 0.29.2
poppler 0.76.1
python 3.7.3
python@2 2.7.16
qpdf 8.4.1
qt 5.12.3
readline 8.0.0_1
rtmpdump 2.4+20151223
rubberband 1.8.2_1
sdl2 2.0.9_1
snappy 1.1.7_1
speex 1.2.0
sqlite 3.28.0
tbb 2019_U5_1
tesseract 4.0.0_1
theora 1.1.1
unbound 1.9.1_1
webp 1.0.2
x264 r2917
x265 3.0
xvid 1.3.5
xz 5.2.4

My colleague's "working" installation on Mojave (AMC auto-multiple-choice 1.4.0_3):

adwaita-icon-theme 3.32.0
aom 1.0.0
atk 2.32.0_1
cairo 1.16.0_2
eigen 3.3.7
ffmpeg 4.1.3_1
flac 1.3.2_1
fontconfig 2.13.1
freetype 2.10.0
frei0r 1.6.1
fribidi 1.0.5
gcc 9.1.0
gdbm 1.18.1
gdk-pixbuf 2.38.1_1
gettext 0.20.1
gflags 2.2.2
giflib 5.1.4_1
glib 2.60.4_1
glog 0.4.0
gmp 6.1.2_2
gnutls 3.6.8
gobject-introspection 1.60.2_1
graphite2 1.3.13
gsettings-desktop-schemas 3.32.0
gtk+3 3.24.9
harfbuzz 2.5.3
hicolor-icon-theme 0.17
icu4c 64.2
ilmbase 2.3.0
imagemagick@6 6.9.10-50
isl 0.21
jasper 2.0.16_1
jpeg 9c
lame 3.100
leptonica 1.78.0
libass 0.14.0_1
libbluray 1.1.1
libcroco 0.6.13_1
libepoxy 1.5.3
libevent 2.1.10
libffi 3.2.1
libmpc 1.1.0
libogg 1.3.3
libpng 1.6.37
librsvg 2.44.14_1
libsamplerate 0.1.9_1
libsndfile 1.0.28
libsoxr 0.1.3
libtasn1 4.13
libtiff 4.0.10_1
libtool 2.4.6_1
libunistring 0.9.10
libvorbis 1.3.6
libvpx 1.8.0
little-cms2 2.9
lzo 2.10
mpfr 4.0.2
netpbm 10.73.27
nettle 3.4.1
nspr 4.21
nss 3.44
numpy 1.16.4
openblas 0.3.6_1
opencore-amr 0.1.5
opencv 4.1.0_2
openexr 2.3.0
openjpeg 2.3.1
openssl 1.0.2s
opus 1.3.1
p11-kit 0.23.16.1
pango 1.42.4_2
pcre 8.43
perl 5.30.0
pixman 0.38.4
pkg-config 0.29.2
poppler 0.77.0
python 3.7.3
python@2 2.7.16
qpdf 8.4.2
qt 5.12.3
readline 8.0.0_1
rtmpdump 2.4+20151223
rubberband 1.8.2_1
sdl2 2.0.9_1
snappy 1.1.7_1
speex 1.2.0
sqlite 3.28.0
tbb 2019_U8
tesseract 4.0.0_1
theora 1.1.1
unbound 1.9.2
webp 1.0.2
x264 r2917
x265 3.0
xvid 1.3.5
xz 5.2.4

@technofeliz
Copy link

My 2 cents : OSX - Mojave 10.14.6
I updated my homebrew today expecting that maybe it will solve the AMC annotation issue by itself... nope.

adwaita-icon-theme 3.32.0
aom 1.0.0
atk 2.32.0_1
cairo 1.16.0_2
ceres-solver 1.14.0_8
cmake 3.15.3
eigen 3.3.7
ffmpeg 4.1.4_1
flac 1.3.2_1
fontconfig 2.13.1
freetype 2.10.1
frei0r 1.6.1
fribidi 1.0.5
gcc 9.2.0
gdbm 1.18.1
gdk-pixbuf 2.38.1_1
gettext 0.20.1
gflags 2.2.2
giflib 5.1.4_1
glib 2.60.7
glog 0.4.0
gmp 6.1.2_2
gnutls 3.6.9
gobject-introspection 1.60.2_1
graphite2 1.3.13
gsettings-desktop-schemas 3.32.0
gtk+3 3.24.11
harfbuzz 2.6.1
hicolor-icon-theme 0.17
icu4c 64.2
ilmbase 2.3.0
imagemagick@6 6.9.10-62
isl 0.21
jasper 2.0.16_1
jpeg 9c
lame 3.100
leptonica 1.78.0
libass 0.14.0_1
libbluray 1.1.2
libcroco 0.6.13_1
libepoxy 1.5.3
libevent 2.1.11
libffi 3.2.1
libidn2 2.2.0_1
libmpc 1.1.0
libogg 1.3.3
libpng 1.6.37
librsvg 2.44.15
libsamplerate 0.1.9_1
libsndfile 1.0.28
libsoxr 0.1.3
libtasn1 4.14
libtiff 4.0.10_1
libtool 2.4.6_1
libunistring 0.9.10
libvorbis 1.3.6
libvpx 1.8.1
little-cms2 2.9
lzo 2.10
metis 5.1.0
mpfr 4.0.2
netpbm 10.73.27
nettle 3.4.1
nspr 4.22
nss 3.46
numpy 1.16.4_1
openblas 0.3.7
opencore-amr 0.1.5
opencv 4.1.1_1
openexr 2.3.0
openjpeg 2.3.1
openssl 1.0.2s
openssl@1.1 1.1.1c
opus 1.3.1
p11-kit 0.23.16.1
pango 1.44.6
pcre 8.43
perl 5.30.0
pixman 0.38.4
pkg-config 0.29.2
poppler 0.80.0
python 3.7.4
python@2 2.7.16_1
qpdf 9.0.0
qt 5.13.0
readline 8.0.1
rtmpdump 2.4+20151223
rubberband 1.8.2_1
sdl2 2.0.10
snappy 1.1.7_1
speex 1.2.0
sqlite 3.29.0
suite-sparse 5.4.0_1
tbb 2019_U8
tesseract 4.1.0
theora 1.1.1
unbound 1.9.3
webp 1.0.3
x264 r2917
x265 3.1.2
xvid 1.3.5
xz 5.2.4

@jestover
Copy link

I was able to fix the issue by switching to an older version of pango

brew unlink pango
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5fe9339558c9fbe49acaa1a2452bcd4d0/Formula/pango.rb
brew switch pango 1.42.4_2

Not sure if this is the best way to resolve the issue, but it worked for me, so I thought I would pass it along.

@Opware2000
Copy link

Hello
I'm experiencing the same issues.
With @jestover solution, it also works for me.
Thanks a lot !
I can finally remove the virtualbox I had installed only to annotate the copies (the not good solution at 20 GB!)

@chuffman377
Copy link
Author

chuffman377 commented Sep 18, 2019

I was not so lucky with this fix. I don't know what went wrong after following @jestover 's suggestion. I got the following error and AMC would not open.

WARNING **: Failed to load shared library 'libgtk-3.0.dylib' referenced by the typelib: dlopen(libgtk-3.0.dylib, 9): Library not loaded: /usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib
  Referenced from: /usr/local/lib/libgtk-3.0.dylib
  Reason: Incompatible library version: libgtk-3.0.dylib requires version 4401.0.0 or later, but libpangocairo-1.0.0.dylib provides version 4201.0.0 at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/darwin-thread-multi-2level/Glib/Object/Introspection.pm line 110.
Could not find GType for package Gtk3::Editable at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/Gtk3.pm line 453.
BEGIN failed--compilation aborted at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/lib/AMC/perl/AMC-gui.pl line 23.

Am I missing something??

@technofeliz
Copy link

technofeliz commented Sep 19, 2019

Hello,

Thanks @jestover for his workaround solution : it worked perfectly for me too.
Sorry for you @chuffman377 : did you try a brew upgrade before applying the workaround with pango ?

For the future, is there a way to have a stable version of AMC with Homebrew ? If one day a brew update or brew upgrade breaks everything, is there a way to rapidly go back to the working version ?

@maelvls
Copy link
Owner

maelvls commented Sep 19, 2019

@chuffman377 the workaround is to build pango from source in order to avoid having a 'bottle' (pre-built binary) that is linked to a missing libgtk-3.0.dylib. Do that instead (it's going to take much more time but it will work 100% of the time):

brew unlink pango
brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
brew switch pango 1.42.4_2

Btw, congratulations to @jestover who found the solution!! 👏👏

@chuffman377
Copy link
Author

I'm so sad that this is still not working for me! I got the same error as before even though I did --build-from-source for pango 1.42.4_2 as suggested by @maelvls.

Is there anything else I can try? Is it possible to incorporate this script into brew install maelvls/amc/auto-multiple-choice?

@maelvls
Copy link
Owner

maelvls commented Sep 21, 2019

@technofeliz

For the future, is there a way to have a stable version of AMC with Homebrew ? If one day a brew update or brew upgrade breaks everything, is there a way to rapidly go back to the working version ?

I don't really know 🤔 I don't think there is a solution to that problem since Homebrew is on 'rolling-release' mode, so we solve problems when they come 😬

My only idea right now would be to also vendor or re-formula every dependency so that I can control how upgrades happen (and I would also be able to have a separate auto-multiple-choice-canary to test new dependencies). But that's a lot lot of work 🙄
My first priority would be to move away from Travis which is a pain to maintain in the Homebrew context

@chuffman377 I don't know how to incorporate that into brew install ... :(

@technofeliz
Copy link

Hello,
I did an brew update and Pango was updated to 1-44.7... and the bug is back...
Fortunately, the workaround is still working...

@mpereda
Copy link

mpereda commented Nov 13, 2019

The workaround is not working. The formulae for pango is not working. No way to downgrading to pango 1.42.4_2, Any ideas?

brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb

@maelvls
Copy link
Owner

maelvls commented Nov 13, 2019

@mpereda Could you describe how the formula is not working? Do you mean that brew install --build-from-source fails? If it does, what are the logs?

@mpereda
Copy link

mpereda commented Nov 13, 2019

Yes. It fails.
These are the logs:

brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Error: Failure while executing; `/usr/bin/curl -q --globoff --show-error --user-agent Homebrew/2.1.16\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.13.6\)\ curl/7.54.0 --fail --progress-bar --location --remote-time --continue-at 0 --output /Users/maria/Library/Caches/Homebrew/Formula/pango.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb` exited with 7. Here's the output:

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

@maelvls
Copy link
Owner

maelvls commented Nov 13, 2019

Looks like a network issue. What happens when you run

curl --show-error -L https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb

@mpereda
Copy link

mpereda commented Nov 13, 2019

Similar error.

curl --show-error -L https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

@maelvls
Copy link
Owner

maelvls commented Nov 13, 2019

Are you behind some kind of proxy maybe? 🤔

@mpereda
Copy link

mpereda commented Nov 13, 2019

No, I'm at home in a regular network.

@mpereda
Copy link

mpereda commented Nov 14, 2019

Just in case it is useful, in another computer I was facing this "(AMC-gui.pl:9484): Gtk-WARNING **: 07:14:39.350: Could not load a pixbuf from icon theme"; it was solved when reinstalling gdk-pixbuf (I have 2.40.0)
brew reinstall gdk-pixbuf
The Pango problem is still there in both macOS High Sierra. Hope it solves :)

@mpereda
Copy link

mpereda commented Nov 16, 2019

I was able to bypass the formulae problem by connecting to the VPN of my workplace.
Then, I was facing the very same problem @chuffman377 had in September:

WARNING **: Failed to load shared library 'libgtk-3.0.dylib' referenced by the typelib: dlopen(libgtk-3.0.dylib, 9): Library not loaded: /usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib
  Referenced from: /usr/local/lib/libgtk-3.0.dylib
  Reason: Incompatible library version: libgtk-3.0.dylib requires version 4401.0.0 or later, but libpangocairo-1.0.0.dylib provides version 4201.0.0 at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/darwin-thread-multi-2level/Glib/Object/Introspection.pm line 110.
Could not find GType for package Gtk3::Editable at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/libexec/lib/perl5/Gtk3.pm line 453.
BEGIN failed--compilation aborted at /usr/local/Cellar/auto-multiple-choice/1.4.0_3/lib/AMC/perl/AMC-gui.pl line 23.

I haven't solved it, but at least I have been able to come back to the first problem by updating again pango to 1.44.7. At least this way, AMC can be opened.

Cheers,
María

@maelvls
Copy link
Owner

maelvls commented Nov 16, 2019

WARNING **: Failed to load shared library 'libgtk-3.0.dylib'

Ohh... that's an issue on 'my side', sorry for that! I must re-bottle amc, but for that I must fix the travis-ci built... and it has been broken for like 6 months now 😬

@maelvls
Copy link
Owner

maelvls commented Nov 17, 2019

I just published auto-multiple-choice 1.4.0_5. It has Pango 1.42.4 inside, so the AMC-buildpdf annotations should work without the '--build-from-source' trick 🥳

Let me know if it doesn't work

@mpereda
Copy link

mpereda commented Nov 17, 2019

Hi! thanks.
I've installed it with "brew install auto-multiple-choice" and it installs ok and opens ok.

But sadly, the annotation problem is still there:

Screen Shot 2019-11-17 at 20 08 01

@maelvls
Copy link
Owner

maelvls commented Nov 17, 2019

😩
Could someone share an example of project (with everything needed) so that I can test locally? 🙂

@mpereda
Copy link

mpereda commented Nov 19, 2019

Here you have. It's just the example on the amc web with an answers sheet. I cannot share real exams used in class.

https://wetransfer.com/downloads/fc95e165c37ac48b3c2fa342c7d2743420191119073729/3b142c5c2bd0bdc23788adc63239fea320191119073729/9c2870

@maelvls
Copy link
Owner

maelvls commented Nov 21, 2019

Thanks! This time, I think the latest 1.4.0_6 works! I tested with the above 'toyP' project, and the annotations appeared (I had to reset my ~/.AMC.d/cf.default.xml settings though)

Screenshot 2019-11-22 at 12 30 36

The two things that I had to make sure were

To which pango lib the Pango.bundle and AMC-buildpdf are linking against?

$ otool -L /usr/local/Cellar/auto-multiple-choice/1.4.0_6/libexec/lib/perl5/darwin-thread-multi-2level/auto/Pango/Pango.bundle
/usr/local/Cellar/auto-multiple-choice/1.4.0_6/libexec/lib/perl5/darwin-thread-multi-2level/auto/Pango/Pango.bundle:
	/usr/local/opt/amc-pango/lib/libpango-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)
	/usr/local/opt/amc-pango/lib/libpangocairo-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)

$ otool -L /usr/local/Cellar/auto-multiple-choice/1.4.0_6/lib/AMC/exec/AMC-buildpdf
/usr/local/Cellar/auto-multiple-choice/1.4.0_6/lib/AMC/exec/AMC-buildpdf:
	/usr/local/opt/amc-pango/lib/libpangocairo-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)
	/usr/local/opt/amc-pango/lib/libpango-1.0.0.dylib (compatibility version 4201.0.0, current version 4201.4.0)

@technofeliz
Copy link

Tested, and validated.

A brew update and brew upgrade didn't work at first.

So, I switch pango to the new version (to remove the annotation workaround) :
brew switch pango 1.44.7

Then I re-install all AMC dependencies (#BruteForceReInstall)...
brew reinstall $(brew deps auto-multiple-choice)

It looks It's working fine (annotations creation included).
I will test on a new project from scratch next week.

Thanks for this new version !

@mpereda
Copy link

mpereda commented Nov 26, 2019

It's working !!!
For me, I have just needed to brew update, brew upgrade, and install amc.

Thank you very much!!!!

@maelvls
Copy link
Owner

maelvls commented Dec 2, 2019

Closing since the issue disappeared when I pinned the pango version to 1.42.4 in the formula.

The issue with pango 1.44 is here: https://gitlab.gnome.org/GNOME/librsvg/issues/520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants