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

Build FontForge git master with Homebrew #1344

Closed
7 tasks done
davelab6 opened this issue May 5, 2014 · 42 comments
Closed
7 tasks done

Build FontForge git master with Homebrew #1344

davelab6 opened this issue May 5, 2014 · 42 comments
Assignees

Comments

@davelab6
Copy link
Member

davelab6 commented May 5, 2014

  • Build FF git master with Homebrew
  • Send a pull request for the updated fontforge.rb recipe
  • Set up Travis to ensure we don't break it - http://docs.travis-ci.com/user/osx-ci-environment/
  • Get the working formula merged into Homebrew upstream
  • Get the formula to build the FontForge.app bundle so it runs
  • Get Travis CI to push this travis-made FontForge.app bundle to the bigv.io server (cancelled as Travis is too puny)
  • Change "macbook-air-built, macports-based daily build to upload to fuuko" to "macbook-air-built homebrew-based daily build uploaded to bigv" (cancelled as not important)

I am trying to compile FontForge with Homebrew, and the formula hasn't been updated for the bootstrap stuff... any tips? :)

$ brew install --verbose --debug fontforge --HEAD;
...
==> ./autogen.sh
Failed to execute: ./autogen.sh
/usr/local/Library/Homebrew/formula.rb:575:in `system`
BuildError: Failed executing: ./autogen.sh 
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 5
When you exit this shell, you will return to the menu.
$ ./bootstrap;
bootstrap: running: glibtoolize --quiet
bootstrap: warning: No 'git' found; imported gnulib modules may be outdated.
bootstrap: warning: No 'gnulib-tool' found; gnulib modules may be missing.
bootstrap: running: autoreconf --symlink --install
configure.ac:98: installing 'config/ar-lib'
configure.ac:94: installing 'config/compile'
configure.ac:89: installing 'config/config.guess'
configure.ac:89: installing 'config/config.sub'
configure.ac:92: installing 'config/install-sh'
configure.ac:92: installing 'config/missing'
configure.ac:671: error: required file 'lib/Makefile.in' not found
Makefile.am:62: error: required directory ./lib does not exist
Unicode/Makefile.am: installing 'config/depcomp'
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Inputbox.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Inputbox.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/MainMenu.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/MainMenu.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Makefile.am:30: warning: wildcard *.cns: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Makefile.am:30: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Msgbox.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Msgbox.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/PopUpButton.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/PopUpButton.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Progressbar.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Progressbar.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/SecureInputbox.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/SecureInputbox.nib/Makefile.am:29: (probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Textbox.nib/Makefile.am:29: warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Textbox.nib/Makefile.am:29: (probably a GNU make extension)
autoreconf: automake failed with exit status: 1
@JoesCat
Copy link
Contributor

JoesCat commented May 25, 2014

Homebrew needs to be updated at approx line 99. See issue #1366

@adrientetar
Copy link
Member

What's the status of this?

@JoesCat
Copy link
Contributor

JoesCat commented Jun 25, 2014

These should be gone since they are put in the config directory, which
bootstrap seems (hard-coded to use).

configure.ac:89: installing 'config/config.guess'
configure.ac:89: installing 'config/config.sub'

These warning should be gone.

osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Inputbox.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Inputbox.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/MainMenu.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/MainMenu.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Makefile.am:30: 
warning: wildcard *.cns: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Makefile.am:30: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Msgbox.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Msgbox.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/PopUpButton.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/PopUpButton.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Progressbar.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Progressbar.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/SecureInputbox.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/SecureInputbox.nib/Makefile.am:29: 
(probably a GNU make extension)
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Textbox.nib/Makefile.am:29: 
warning: wildcard *.nib: non-POSIX variable name
osx/FontForge.app/Contents/MacOS/CocoaDialog.app/Contents/Resources/Textbox.nib/Makefile.am:29: 
(probably a GNU make extension)

As for the homebrew formula, a suggestion has been posted in #1366 which
should work, and the OP of #1366 indicated it does work.
I suggest someone running a MAC needs to triage the solution to confirm it
does works, and after it is confirmed, follow-up with homebrew to update
fontforge.rb

NOTE the ./bootstrap and ./autogen.sh (homebrew if/then/else) is a seperate
issue from python-dev which still needs to be hardcoded to stop since the
warning is quietly ignored by homebrew.

@davelab6
Copy link
Member Author

@monkeyiq please look into this :)

@monkeyiq
Copy link
Contributor

A few general "brew" questions. For me the above brew install line from Dave's original post tries to build without using X. This may be that my brew is set to not use X? If I use the below then I get a GUI:

brew install --verbose --debug fontforge --HEAD --with-x

And is there anything needed to 'select' the python that brew has installed. By default fontforge doesn't find that python's pc file so will fail to build. I have a work around for that, but thought I'd ask in case there is already some work around in brew. As brew seems to set PKG_CONFIG_PATH to various subdirectories for you, but not the python one.

@davelab6
Copy link
Member Author

Did you look at Homebrew/legacy-homebrew#27221 ?

I think if you have done 'brew install python' already then the build will find the pc files.

Do you have this, https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python#technical-details ?

@monkeyiq
Copy link
Contributor

Hmm adding some python deps to the brew file doesn't seem to resolve things right off the bat. I notice that python-config is then in the path and might work, but fontforge looks to use pkg-config to do the magic. I'll have a look at a work around.

BuildError: Failed executing: ./configure --prefix=/usr/local/Cellar/fontforge/HEAD --enable-double --without-freetype-bytecode --with-static-imagelibs --enable-pyextension
4. shell
Choose an action: 4

bash-3.2$ pkg-config --list-all |grep -i py
xpyb                                XPyB - X-protocol Python Binding
bash-3.2$ python-config --cflags
-I/usr/local/Cellar/python/2.7.8/Frameworks/P

@monkeyiq
Copy link
Contributor

ok I have something for the python issue now. next up is to fix that git/gnulib issue (top post) in a more permanent way.

@davelab6
Copy link
Member Author

AHA!! :) http://docs.travis-ci.com/user/osx-ci-environment/

We can now test that FontForge builds with HomeBrew for each pull request via Travis!!

@davelab6
Copy link
Member Author

I updated the top of the issue to list out the goals

@monkeyiq
Copy link
Contributor

Still need to fix something in fontforge.rb

@monkeyiq
Copy link
Contributor

@dave does it build for you now using Homebrew/legacy-homebrew#31226

@monkeyiq
Copy link
Contributor

Current Pull Request for point #2 is at Homebrew/legacy-homebrew#31226

@davelab6
Copy link
Member Author

davelab6 commented Aug 6, 2014

@monkeyiq yes, that :) Found a small bug with the About window, will report a new issue for it.

@davelab6
Copy link
Member Author

@monkeyiq is the working formula merged into Homebrew upstream?

And does the formula now build the FontForge.app bundle?

@DomT4
Copy link
Contributor

DomT4 commented Sep 22, 2014

@davelab6 Looks like it was merged in this commit.

And yes, an app bundle is being built, but isn't symlinked into /Applications due to the slightly unusual placement of that app bundle.

@DomT4
Copy link
Contributor

DomT4 commented Sep 22, 2014

In fact, symlinking into ~/Applications doesn't work at all. Fontforge refuses to launch from the .app bundle compiled from source. Hmm. The only way to launch it is to execute fontforge in your terminal application which causes X11 and Fontforge to spring open.

@davelab6
Copy link
Member Author

The bundle needs to be in /Applications.

@DomT4
Copy link
Contributor

DomT4 commented Sep 22, 2014

Homebrew doesn't directly install anything into /Applications. It symlinks from {prefix} into /Applications. That Fontforge symlink into /Applications doesn't work. If Fontforge is configured to absolutely require a solid, non-symlinked bundle in /Applications it'll never work in that way through Homebrew. I'll double check the --HEAD build in a moment, but I think it's the same deal.

@davelab6
Copy link
Member Author

davelab6 commented Oct 3, 2014

HB can build a FontForge bundle in ~/Appplications and when the user runs it, it will say 'move me to /Applications' and quit. Will that be ok?

@davelab6
Copy link
Member Author

davelab6 commented Oct 3, 2014

@monkeyiq there are 2 oustanding tasks in the top:

  • Get the formula to build the FontForge.app bundle so it runs
  • Get Travis CI to push this travis-made FontForge.app bundle to the bigv.io server

Are those done?

@DomT4
Copy link
Contributor

DomT4 commented Oct 3, 2014

We don't directly build anything in /Applications. Even Homebrew-Cask doesn't directly install there. Everything is done via symlinks, ie, in this case we'd move the app bundle out of its current prefix & into the main installation folder (In this case, usually /usr/local/cellar/fontforge and then symlink from there into /Applications. If you can get that setup to work with the message that the bundle itself should be moved to /Applications Homebrew can't nullify that suggestion.

@davelab6
Copy link
Member Author

It doesn't work symlinked today:
screen shot 2014-10-16 at 6 34 19 pm

However, if I remove the check at https://github.com/fontforge/fontforge/blob/master/osx/FontForge.app/Contents/MacOS/FontForge#L13-L23 :

# $0 is possibly relative path to this script.
SCRIPT_PATH="$( cd "$( dirname "$0" )" && pwd )"
PKGBASEPATH="$( cd "${SCRIPT_PATH}/../.." && pwd )"

echo "PKGBASE: $PKGBASEPATH"
if [ y"$PKGBASEPATH" != "y/Applications/FontForge.app" ]; then
  COCOA_DIALOG="${SCRIPT_PATH}/CocoaDialog.app/Contents/MacOS/CocoaDialog";
  $COCOA_DIALOG msgbox --no-newline \
    --title "FontForge: Error starting" \
    --text "FontForge is in the wrong folder on your computer." \
    --informative-text "Please ensure that the FontForge.app directory is directly inside your /Applications folder." \
    --button1 "OK" --float
    BASEPATH="$( cd "${PKGBASEPATH}/.." && pwd )"
    open "$BASEPATH"
    exit;
fi

it runs!

So @monkeyiq please update the check so that if you move the app to /tmp and symlink it, it passes this shell script test. Then I hope @DomT4 can adjust the homebrew receipe to symlink to the app bundle it builds in /usr/local/cellar/fontforge

@davelab6
Copy link
Member Author

@DomT4 good news, @monkeyiq has made the change - https://github.com/fontforge/fontforge/pull/1808/files#diff-0

@monkeyiq
Copy link
Contributor

This and an earlier issue are in 201410/17_1506

@davelab6
Copy link
Member Author

@monkeyiq but I think @DomT4 can not build his own package to get to this step :(

@DomT4
Copy link
Contributor

DomT4 commented Oct 17, 2014

Then I hope @DomT4 can adjust the homebrew receipe to symlink to the app bundle it builds in /usr/local/cellar/fontforge

Yup. This is easily enough done once we get a successful build inside Homebrew.

@davelab6
Copy link
Member Author

@DomT4 do we now have a successful build?

@DomT4
Copy link
Contributor

DomT4 commented Oct 22, 2014

@davelab6 Yup. I've had to temporarily kill off the colab elements, see #1837, but we're good to go on moving forwards without those for now.

@davelab6
Copy link
Member Author

Okay great! So the remaining task on this issue is for @monkeyiq to change from a "macbook-air-built, macports-based daily build to upload to fuuko" to "macbook-air-built homebrew-based daily build uploaded to bigv"

This should help to ensure that we keep brew install fontforge --HEAD working at all times.

@DomT4
Copy link
Contributor

DomT4 commented Oct 23, 2014

For any urgent fixes, ie fixing the dylib issue, fixing the issue in #1838, etc I'll very probably port those backwards to the stable build in Homebrew. Just shout if you need anything and I'll do my best.

@davelab6
Copy link
Member Author

Nah, lets just make a new release next week

@DomT4
Copy link
Contributor

DomT4 commented Oct 23, 2014

Alright, Will keep an eye out. I'll keep fingers crossed the dylib issue is solved by that point and I can turn collab back on by default, but if a week is too soon I'll just leave that out as an option instead again.

@davelab6
Copy link
Member Author

@DomT4 dynlib is solve :)

@DomT4
Copy link
Contributor

DomT4 commented Oct 27, 2014

@davelab6 Cheers Dave. I could use a release here to nicely wrap up all the changes made in the last week or so if possible? There's probably way too much to backport at this point without ensuring nobody ever wants to maintain the Homebrew formula ever again, heh.

@adrientetar
Copy link
Member

Travis OS X still fails FWIW… e.g. https://travis-ci.org/fontforge/fontforge/jobs/39176945

@DomT4
Copy link
Contributor

DomT4 commented Oct 27, 2014

^^ It appears to ship 4 dependencies that Homebrew's formula doesn't. Is that an issue?

The Travis build is waaaay behind Homebrew's though, even with your custom modifications to make life easier on Travis the script it is using is at least 2 or 3 versions behind Homebrew's.

@DomT4
Copy link
Contributor

DomT4 commented Oct 27, 2014

The current Homebrew formula with the current Fontforge git head works:

==> Summary
🍺  /usr/local/Cellar/fontforge/HEAD: 1278 files, 39M, built in 7.9 minutes

@davelab6
Copy link
Member Author

I think Travis installs their own easy_install and pip, so its failing on brew install python...

@DomT4
Copy link
Contributor

DomT4 commented Oct 28, 2014

If Python is already on the system and stored in /usr/bin or /usr/local/bin you should be able to trim the Python dependency from the formula and make it pass Travis that way.

@davelab6
Copy link
Member Author

But will ff python work that way?
On 28 Oct 2014 23:19, "Dominyk Tiller" notifications@github.com wrote:

If Python is already on the system and stored in /usr/bin or
/usr/local/bin you should be able to trim the Python dependency from the
formula and make it pass Travis that way.


Reply to this email directly or view it on GitHub
#1344 (comment)
.

@DomT4
Copy link
Contributor

DomT4 commented Oct 28, 2014

Should do, if you're building from source each time. It might be worth passing the --build-from-source flag to Travis for the Homebrew build of Fontforge. I believe source builds can use the system Python just fine without having to specify a Python dependency in the formula.

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

No branches or pull requests

5 participants