bakercp / ofxUnicode

An openFrameworks addon that wraps various Unicode algorithms.
Other
15 stars 13 forks source link

no scripts/build.sh #8

Open stephanschulz opened 3 years ago

stephanschulz commented 3 years ago

Hello

I am coming back to this addon after a long time, now trying to run it for OF 0.11.0 on macOS 10.15.7. There is no such script scripts/build.sh in the folder.

I tried the `bootstrap.sh' and get this error

stephanschulz@Komputer scripts % sh bootstrap.sh 
fatal: not a git repository (or any of the parent directories): .git

I also tried installing all .sh in the formulas folder. But still get some compile error

/Applications/of_v0.11.0_osx_release/addons/ofxUnicode/libs/ofxUnicode/include/ofx/Unicode.h:20:10: 'ucdn.h' file not found
eelke commented 3 years ago

@bakercp The build.sh script is missing indeed. I've looked around in an attempt to get things going regardless, and ran the ./bootstrap.sh instead, a couple of different attempts. While I did not get the Git error like @stephanschulz (see below!), it was quite a battle.

Here is a log of my process:

  1. The first of the formulas (fribidi.sh) already failed to build. I'm on MacOS 12 Monterey, so maybe the compiler flags are outdated? Last lines in the terminal:
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/eelke/Developer/of_v0.11.2_osx_release/scripts/apothecary/apothecary/build/fribidi':
configure: error: C compiler cannot create executables
See `config.log' for more details
  1. ..However! When I went to the (automatically created) fribidi folder (of/scripts/apothecary/build/fribidi) and ran a ./configure && makemanually there, it compiled perfectly fine! After this I removed the fribidi.sh script from the addons formulas folder, and ran ./bootstrap.sh again, in order to continue to the next lib.

  2. Which was harfbuzz, and it also failed to install. Directly after downloading 'freetype', while all the dependencies downloaded and extracted correctly, it failed to extract its own archive harfbuzz-2.4.0.tar.bz2. However, after unpacking manually, I was able to ./configure && make harfbuzz just fine from the command line. I have also tested this method with freetype, libpng and pkg-config folders. Everything compiled just fine.

  3. I commented out the sha2 check from harfbuzz.sh, as this seemed to be failing. The checksum of the downloaded tarball was correct upon manual inspection though, so probably the bash script is getting things wrong.

  4. At this point I figured that I was doing silly things, and probably important compiler flags would be missing so the compiled software would not work correctly. Bummer! I remembered that you cannot compile to 32bit on MacOS 12, so every ./configure command inside the scripts folder probably needed be updated. I removed all -arch i386 flags, and kept the -arch x86_64 -Xarch_x86_64 in place. (I don't even know what the Xarch flag does), cleared out the build folder and ran ./bootstrap.sh again...

Very different result! Everything built correctly! Well, almost.

  1. Up until 'raqm'. That would not compile, due to an issue as described here: https://github.com/HOST-Oman/libraqm/issues/124#issuecomment-727636419. To combat this issue I needed to change its compiler flags to include --disable-Werror.

After all of this, I was finally able to run ./bootstrap.sh without any errors, and all the libs have been generated and added to the ofxUnicode addon folder. Hurrah!

@stephanschulz: Make sure you have cloned the addon so you have access to the repo instead of just downloading the zip from Github. The bootstrap script tries to update a git submodule, called scripts/ofx and wont be able to continue otherwise.

eelke commented 3 years ago

I have pushed my changes here: https://github.com/eelke/ofxUnicode/tree/develop If these seem okay I can create a pull request, but I am not certain this won't cause any other issues.