FET Forum

FET Support (English) => Get Help => Topic started by: Pg on June 09, 2016, 10:40:04 AM

Title: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 09, 2016, 10:40:04 AM
Hi,

I have an MacBook Pro 13", 2010.
I installed :

Xcode 7.3.1

Qt 5.6.1 (Clang 7.0 (Apple), 64 bit (https://download.qt.io/official_releases/qt/5.6/5.6.1/)

FET 5.29.4

but don't work...

terminal :
Last login: Thu Jun  9 09:52:55 on console
MacBook-Pro-di-****:~ Roby$ cd fet-5.29.4 
MacBook-Pro-di-****:fet-5.29.4 Roby$ /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -spec macx-g++ fet.pro 
MacBook-Pro-di-****:fet-5.29.4 Roby$ make
cd src/ && ( test -e Makefile || /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake /Users/Roby/fet-5.29.4/src/src.pro -spec macx-g++ -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
/Users/Roby/Qt5.6.0/5.6/clang_64/bin/qmake -spec macx-g++ -o Makefile src.pro
make[1]: /Users/Roby/Qt5.6.0/5.6/clang_64/bin/qmake: No such file or directory
make[1]: *** [Makefile] Error 1
make: *** [sub-src-src-pro-make_first] Error 2
MacBook-Pro-di-****:fet-5.29.4 Roby$ 

I installed other old Qt but don't work.

even with only the command line : qmake -spec macx-g++ fet.pro 

can you help me?

thanks
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 09, 2016, 10:55:57 AM
Please keep installed Qt 5.6.1 only, and try:

> /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake fet.pro
> make

If the above does not work, let me know and I'll search some more on the internet.

Edit: I found http://qt.apidoc.info/5.1.1/qtdoc-online/developing-on-mac.html , see: "Note: You can also use the qmake -spec macx-xcode command to generate the .xcodeproj file, which is required to open your Qt project in XCode." Might help.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 09, 2016, 01:32:16 PM
I tried but it does not work ...
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 09, 2016, 03:28:03 PM
I found also this: http://www.bizicbojan.com/post/2014/01/23/Build-Qt-projects-on-Windows-and-OS-X-without-Qt-installation.aspx

Please let me know.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 09, 2016, 08:53:34 PM
sorry but it is too difficult for me ... :-\
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 10, 2016, 11:10:04 AM
Try:

./Users/yourname/QT5_build/bin/qmake [Your .pro file] -r -spec /Users/yourname/QT5_build/mkspecs/macx-clang
make -f [Path to your make file] release

and tell me what you get.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 11, 2016, 10:31:27 AM
cd fet-5.29.4

enter

./Users/Roby/QT5_build/bin/qmake -spec macs-g++fet.pro -r -spec /Users/Roby/QT5_build/mkspecs/macx-clang

enter

make -f [Path to your make file] release        (what is this?)

enter
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Volker Dirr on June 11, 2016, 10:47:51 AM
we need to know the "answer" from the terminal.

i suggest to set a PATH to the qt bin stuff and start compiling from fet directory. that is much easier, because you don't need to write always the whole path.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 11, 2016, 12:36:26 PM
Quote
./Users/yourname/QT5_build/bin/qmake [Your .pro file] -r -spec /Users/yourname/QT5_build/mkspecs/macx-clang

Please replace the first part with the path to qmake: /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake , and the last part with /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang

Quote
make -f [Path to your make file] release

Inside the same FET-5.29.4 directory type make -f Makefile release
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 11, 2016, 03:54:29 PM
MacBook-Pro-di-*****:~ Roby$ cd fet-5.29.4
MacBook-Pro-di-**********:fet-5.29.4 Roby$ /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang
Cannot read /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang: file to open is a directory
Error processing project file: /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang
MacBook-Pro-di-************:fet-5.29.4 Roby$ make -f Makefile release
make: *** No rule to make target `release'.  Stop.
MacBook-Pro-di-*********:fet-5.29.4 Roby$
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 11, 2016, 04:00:49 PM
Please do:

/Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -r -spec /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang
then
make -f Makefile release

(you forgot "-r -spec" in the first line).
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 11, 2016, 04:27:18 PM
I installed FET 5.29.5
I have tried with the normal procedure :
cd fet-5.29.5
enter
/Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -spec macx-g++ fet.pro
enter
make
enter

but :

/Users/Roby/Qt5.6.1/5.6/clang_64/lib/QtCore.framework/Headers/qpair.h:62:52: error:
      'T1' does not refer to a value
        Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<T1&>() = p.first) && ...
                                                   ^
/Users/Roby/Qt5.6.1/5.6/clang_64/lib/QtCore.framework/Headers/qpair.h:42:17: note:
      declared here
template <class T1, class T2>
                ^
/Users/Roby/Qt5.6.1/5.6/clang_64/lib/QtCore.framework/Headers/qpair.h:62:55: error:
      expected expression
        Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<T1&>() = p.first) && ...
                                                      ^
/Users/Roby/Qt5.6.1/5.6/clang_64/lib/QtCore.framework/Headers/qpair.h:62:57: error:
      expected expression
        Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval<T1&>() = p.first) && ...
                                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [../tmp/gui/timetableexport.o] Error 1
make: *** [sub-src-src-pro-make_first] Error 2
MacBook-Pro-di-Roberta-Cabianca:fet-5.29.5 Roby$

I have tried with the last procedure :

cd fet-5.29.5
enter/Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -r -spec /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang
enter
make -f Makefile release
enter

but :

MacBook-Pro-di-******:~ Roby$ cd fet-5.29.5
MacBook-Pro-di-******:fet-5.29.5 Roby$ /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -r -spec /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang
Reading /Users/Roby/fet-5.29.5/src/src.pro
Reading /Users/Roby/fet-5.29.5/src/src-cl.pro
MacBook-Pro-di-********:fet-5.29.5 Roby$ make -f Makefile release
make: *** No rule to make target `release'.  Stop.
MacBook-Pro-di-********:fet-5.29.5 Roby$
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 11, 2016, 04:33:03 PM
In the last line, instead of "make -f Makefile release" type only "make -f Makefile" or also try simply "make".

If it does not work, try removing the FET unpacked and unpack it again and only do the clang part (/Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -r -spec /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang and make).

If it does not work, try again with: /Users/Roby/Qt5.6.1/5.6/clang_64/bin/qmake -spec /Users/Roby/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang and make.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Pg on June 11, 2016, 06:48:33 PM
Work!

cd fet-5.29.5

enter

/Users/Yourname/Qt5.6.1/5.6/clang_64/bin/qmake -r -spec /Users/Yourname/Qt5.6.1/5.6/clang_64/mkspecs/macx-clang

enter

make

enter

Thanks!
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on June 11, 2016, 06:51:51 PM
You are welcome! :)

Note: The "-r" parameter might be not necessarily needed.
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: davvidde on October 17, 2020, 06:08:01 PM
Hello Liviu,

I am trying to compile fet 5.47.0 on El Capitan 5.11.6 with Qt 5.7.0 (I had this install in my Mac Book Pro which I used successfully to build FET 5.35.7) but when I run "/Users/davide/Qt5.7.0/5.7/clang_64/bin/qmake -r -spec /Users/davide/Qt5.7.0/5.7/clang_64/mkspecs/macx-clang"
I get some errors of missing files (see below), then the "qmake" command failed almost instantly. What can I do?

Thanks
Davide.

macdavdue:fet-5.47.0 davide$ /Users/davide/Qt5.7.0/5.7/clang_64/bin/qmake -r -spec /Users/davide/Qt5.7.0/5.7/clang_64/mkspecs/macx-clang
Info: creating stash file /Users/davide/SORGENTI/fet-5.47.0/.qmake.stash
Reading /Users/davide/SORGENTI/fet-5.47.0/src/src.pro
WARNING: Failure to find: interface/modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.ui
WARNING: Failure to find: interface/modifyconstraintactivitiesminsimultaneousinselectedtimeslotsform_template.ui
WARNING: Failure to find: interface/addconstraintstudentssetmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/constraintstudentssetmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/modifyconstraintstudentssetmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/addconstraintstudentsmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/modifyconstraintstudentsmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/modifyconstraintteachermingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/addconstraintteachersmingapsbetweenorderedpairofactivitytagsform_template.ui
WARNING: Failure to find: interface/modifyconstraintteachersmingapsbetweenorderedpairofactivitytagsform_template.ui
Reading /Users/davide/SORGENTI/fet-5.47.0/src/src-cl.pro

macdavdue:fet-5.47.0 davide$ make

... LINES STRIPPED ....

/Users/davide/Qt5.7.0/5.7/clang_64/bin/uic interface/addconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.ui -o ../tmp/gui/ui_addconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.h
make[1]: *** No rule to make target `interface/modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.ui', needed by `../tmp/gui/ui_modifyconstraintactivitiesmaxsimultaneousinselectedtimeslotsform_template.h'.  Stop.
make: *** [sub-src-src-pro-make_first] Error 2

Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: Liviu Lalescu on October 17, 2020, 07:09:49 PM
Hello, Davide,

Please unpack with a modern unpacker. The longer files names are truncated (incorrectly). I use on my GNU/Linux command-line: "tar -jxvf fet-5.47.0.tar.bz2" (involves tar and bzip2/bunzip2).
Title: Re: Compilation problem with Mac OS X El Capitan 10.11.5
Post by: davvidde on October 27, 2020, 10:35:10 PM
Thank you,

in effective, it seems that iPack.app from the Apple Appstore isn't fully compliant for unpacking. Unix command tar -xvf is good for sure.

The question was very simple, I should give the answer myself, perhaps I'm going to be old... ::)

Davide.