Author Topic: Installing 1.5.0svn on 10.8.5 with Homebrew problem  (Read 3899 times)

wkc1986

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Installing 1.5.0svn on 10.8.5 with Homebrew problem
« on: May 20, 2014, 06:58:27 pm »
hello...tried to use the Homebrew formula linked on the wiki to install 1.5.0. I installed Qt 5.2.1 in ~/Qt/5.2.1/ (https://gist.githubusercontent.com/luzpaz/9042115/raw/scribus-dev.rb). I get this error:

'CMake Error: The source directory "/tmp/scribus-dev-hrSL/ -DQT_PREFIX=~/Qt/5.2.1/clang_64" does not exist.'

But ~/Qt/5.2.1/clang_64 very much exists. Any ideas? thanks  ???

utnik

  • Hero Member
  • *****
  • Posts: 990
  • Country: ch
  • Karma: 12
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #1 on: May 20, 2014, 07:47:41 pm »
hello wkc

cMake searches the file in 'tmp' – did you miss 'chdir' somewhere?

utnik

wkc1986

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #2 on: May 21, 2014, 01:35:55 am »
Hi thanks for the response. This is my first time using Homebrew or cmake so I'm pretty confused unfortunately. I don't know why cmake is searching in the wrong directory or even what directory it's in, I only know that the cmake command generated by Homebrew is:

cmake .  -DBUILD_OSX_BUNDLE=1  -DWANT_CAIRO=1  -DWANT_HUNSPELL=1  -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/Cellar/scribus-dev/HEAD/ScribusDev.app/Contents/  -DUSE_QT5=1  -DWITH_PODOFO=1  -DQT_PREFIX=~/Qt/5.2.1/clang_64

Nermander

  • Hero Member
  • *****
  • Posts: 1090
  • Karma: 15
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #3 on: May 21, 2014, 08:35:10 am »
or even what directory it's in,

You need to know that because...

Code: [Select]
cmake .  -DBUILD_OSX_BUNDLE=1  ...
The period after cmake means "current directory", so the current directory has to be where the source is located.

wkc1986

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #4 on: May 23, 2014, 11:16:47 pm »
Right, so I tried building again with brew --debug which drops me into a shell as cmake fails. I find that I'm in the directory

/private/tmp/scribus-dev-zow5

which I guess is a temporary directory Homebrew creates to store the source code (in scribus/) and cmake files (in cmake/) and run the build (the '-zow5' changes to something different each time). Of course Qt is not here.

But it almost seems that what's wrong is cmake is interpreting the entire string '/tmp/scribus-dev-zow5/ -DQT_PREFIX=~/Qt/5.2.1/clang_64' as a path, which is obviously wrong.

wkc1986

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #5 on: May 24, 2014, 12:17:39 am »
(ETA: the full CMake error message)

Well I have solved (?) that problem to run into another one. Looking at man cmake and the MacPorts guide I saw that cmake will take whatever the last argument is and append that to the current directory to find the source dir, so I modified the Homebrew formula to give

Code: [Select]
cmake \ -DBUILD_OSX_BUNDLE=1 \ -DWANT_CAIRO=1 \ -DWANT_HUNSPELL=1 \ -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/Cellar/scribus-dev/HEAD/ScribusDev.app/Contents/ \ -DUSE_QT5=1 \ -DWITH_PODOFO=1 \ -DQT_PREFIX=~/Qt/5.2.1/clang_64 scribus
and I no longer have the 'source directory does not exist' error. But now cmake crashes with

Code: [Select]
-- The C compiler identification is Clang 5.1.0
-- The CXX compiler identification is Clang 5.1.0
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang
-- Check for working C compiler: /usr/local/Library/ENV/4.3/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++
-- Check for working CXX compiler: /usr/local/Library/ENV/4.3/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at styles/CMakeLists.txt:21 (QT5_WRAP_CPP):
  Unknown CMake command "QT5_WRAP_CPP".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/tmp/scribus-dev-Dt94/CMakeFiles/CMakeOutput.log".
/usr/local/Library/Homebrew/formula.rb:575:in `system'
« Last Edit: May 24, 2014, 12:24:58 am by wkc1986 »

wkc1986

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #6 on: May 24, 2014, 02:04:51 am »
OK, I'm happy to say I have managed to compile and run (something, anyway). :) Some spaces in the Brew formula were messing up the cmake options. Thanks for all your help! Here is what worked for me.

Code: [Select]
require 'formula'

  class ScribusDev < Formula
  head 'svn://scribus.net//trunk/Scribus', :using => :svn
  depends_on 'cmake' => :build
  depends_on 'little-cms2'
  # Install Qt5 beforehand and link to it via CMAKE below
  # depends_on 'qt5'
  depends_on 'cairo'
  depends_on 'jpeg'
  depends_on 'libtiff'
  depends_on 'libart'
  depends_on 'fontconfig'
  depends_on 'openssl'
  depends_on 'pkg-config' => :build
  depends_on 'python'
  depends_on 'hunspell'
  # zlib on 10.8.5 is not up to date enough hence the following:
  depends_on 'homebrew/dupes/zlib'
  depends_on 'ghostscript' => :recommended
  depends_on 'graphicsmagick' => :recommended
  depends_on 'boost' => :recommended
  # depends_on 'podofo' => :recommended

  def install
    system "cmake",
                    "-DBUILD_OSX_BUNDLE=1",
                    "-DWANT_CAIRO=1",
                    "-DWANT_HUNSPELL=1",
                    "-DCMAKE_INSTALL_PREFIX:PATH=#{prefix}/ScribusDev.app/Contents/",
                    "-DUSE_QT5=1",
                    "-DWITH_PODOFO=1",
                    # Change ~/Qt/x.y.z/clang_64 based on what version Qt you have installed
                    "-DQT_PREFIX=/Users/YOUR_NAME_HERE/Qt/5.2.1/clang_64",
                    "."
                    # "-DWANT_SCRIPTER2=1",
    system "make"
    system "make install"
  end
end

utnik

  • Hero Member
  • *****
  • Posts: 990
  • Country: ch
  • Karma: 12
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #7 on: May 24, 2014, 09:56:05 am »
thanks for submitting your solution!

i'm still waiting for a scribus 1.4.4 before the end of this year – with the ability to export .pdf/x-1a i would have enough 1.5 functionality for the time being.
if 1.4.4 takes more time, i'll try your modified code…

utnik

Kunda

  • Administrator
  • Full Member
  • *****
  • Posts: 218
  • Karma: 2
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #8 on: June 02, 2014, 12:44:05 pm »
@wkc1986 Thanks very much for your submission. The github gist has been altered per your workaround. (I've changed the
Only thing is that the following line has been altered:

"-DQT_PREFIX=/Users/YOUR_NAME_HERE/Qt/5.2.1/clang_64",
to
"-DQT_PREFIX=~/Qt/5.3/clang_64",

Cheers,
/Kunda

toyotadesigner

  • Jr. Member
  • **
  • Posts: 54
  • Country: es
  • Karma: 0
  • Active Scribus Mac User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #9 on: June 03, 2014, 08:02:09 pm »
Scribus 1.4.4 had already been released. I've installed the *.dmg without any problems.

[edit: typo corrected]
« Last Edit: June 07, 2014, 10:55:11 am by toyotadesigner »

utnik

  • Hero Member
  • *****
  • Posts: 990
  • Country: ch
  • Karma: 12
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #10 on: June 03, 2014, 08:34:27 pm »
Scribus 1.4.4 had already been released.

just sent the first four .pdf/x1-a files generated with 1.4.4 to the printshop – works fine so far…

utnik

Kunda

  • Administrator
  • Full Member
  • *****
  • Posts: 218
  • Karma: 2
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #11 on: June 04, 2014, 12:30:04 pm »
Homebrew formula was recently broken because of changes made to the svnheader. I need to change the recipe for how homebrew checksout the scn so that it creates a revision numbered copy.

Kunda

  • Administrator
  • Full Member
  • *****
  • Posts: 218
  • Karma: 2
  • Scribus User
Re: Installing 1.5.0svn on 10.8.5 with Homebrew problem
« Reply #12 on: June 22, 2014, 03:46:11 pm »
As of June 22nd, 2014 the Homebrew formula works again:
http://wiki.scribus.net/canvas/Scribus_and_Homebrew

Important Note (from the core devs):
- Dont use 1.5 for production, dont rely on it to work day to day. Use 1.4.4 for that.
- If you ignore the above, be prepared to stay on a version that works for you. There's normally no
reason to change every day.
- Homebrew is not supported by Scribus, nor is building with it. That's Kunda's thing.
- No bugs for homebrew solutions in our tracker.

 

palmate