dev environment setup and usage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

dev environment setup and usage

DErik
I thought I was. Refer to "https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit" web page. I got there because I was trying to install Qt because the install instructions on "http://wiki.librecad.org/index.php/LibreCAD_Installation_from_Source" for building from downloaded source said to install Qt and new gcc. So after installing Macports (needed to install Qt), the installation for Qt using Macports says to:
sudo port install qt5 # It's not qt5-mac anymore.
That worked, so the next part of the instructions then say:

The default location for qt5's qmake is /opt/local/libexec/qt5/bin/qmake. If the qmake on path is different, you can indicate the correct one with QMAKE environment variable.

QMAKE=/opt/local/libexec/qt5/bin/qmake gem install capybara-webkit

So that's why I did it. Qt appears to be installed and functional. But none of the examples are there to learn how to use it, nor are the help or man pages. The on-line manual pages will take some time to browse through for specifics on how to use Qt. However, I did load the ~/github/LibreCAD/librecad.pro file into Qt and am able to browse through the source files and even bring up the GUIs. So I can now do some of the research I need to do even if the installation isn't quite correct or complete. I should also mention that I attempted to run a debug session via Qt, but it didn't compile. I got over 58000 issues listed; and it quit outputting to the "Compile Output" window. (I guess it knew I wasn't going to read through all that stuff anyway.) I figure it is still due to an incorrect or incomplete download or installation of Qt or Macports or some other setup I didn't do correctly. Recall that **qmake** is actually on my system now, but I have to manually add it to my PATH variable in a console window. It isn't part of my automatic startup script for the console (.bashrc). I guess I'll have to create that file and add a PATH modification to it for the qmake directory. But Qt should know where all its stuff is already.

-- DErik --

Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

dxli
Hi DErik,

please read through our wiki, even though updates are needed, like package names changed, executable paths changed, etc. The building process for LC is still by qmake.

also, read the building scripts come with LC in LC source folder:

scripts/build-osx.sh

DErik wrote
I thought I was. Refer to "https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit" web page. I got there because I was trying to install Qt because the install instructions on "http://wiki.librecad.org/index.php/LibreCAD_Installation_from_Source" for building from downloaded source said to install Qt and new gcc. So after installing Macports (needed to install Qt), the installation for Qt using Macports says to:<br>
sudo port install qt5 # It's not qt5-mac anymore.<br>
That worked, so the next part of the instructions then say:<br><br>

The default location for qt5's qmake is /opt/local/libexec/qt5/bin/qmake. If the qmake on path is different, you can indicate the correct one with QMAKE environment variable.<br><br>

QMAKE=/opt/local/libexec/qt5/bin/qmake gem install capybara-webkit<br><br>

So that's why I did it. Qt appears to be installed and functional. But none of the examples are there to learn how to use it, nor are the help or man pages. The on-line manual pages will take some time to browse through for specifics on how to use Qt.

However, I did load the ~/github/LibreCAD/librecad.pro file into Qt and am able to browse through the source files and even bring up the GUIs. So I can now do some of the research I need to do even if the installation isn't quite correct or complete. I should also mention that I attempted to run a debug session via Qt, but it didn't compile. I got over 58000 issues listed; and it quit outputting to the "Compile Output" window. (I guess it knew I wasn't going to read through all that stuff anyway.) I figure it is still due to an incorrect or incomplete download or installation of Qt or Macports or some other setup I didn't do correctly. Recall that **qmake** is actually on my system now, but I have to manually add it to my PATH variable in a console window. It isn't part of my automatic startup script for the console (.bashrc). I guess I'll have to create that file and add a PATH modification to it for the qmake directory. But Qt should know where all its stuff is already.
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
This post was updated on .
In reply to this post by DErik
DErik wrote
 But the following command to make sure the libraries can be found by “pkg-config”:
   $ echo "QT_CONFIG -= no-pkg-config" >> custom.pro
won’t work because there is no file “custom.pro” to append the line to. At least not in "~/github” or any sub-directories.
https://github.com/LibreCAD/LibreCAD/issues/634

In case you didn't figure it out, custom.pro is a file you make.
The information is only in the Windows section
http://wiki.librecad.org/index.php/Build_from_source#Custom_files
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
Correction: "...custom.pro is a file you edit."

https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/custom.pro

I'm getting a Mac in a few days, but you will probably have this figured out by then... ;-]
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

DErik
I get a 404 on the above link

-- DErik --

Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

DErik
In reply to this post by ravas
Where should the custom.pro reside, if it is supposed to be on the OS X platform at all? And should it include references to the boost directories in it? I don't have boost installed anyway. Do I need it on Mac?

-- DErik --

Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

dxli
for the time being, try to build LC without using custom.pri (preferred over custom.pro).

Yes, boost is required dependency for LC.

You can easily install boost in MacPorts, and without any manual configuration to use the boost library.

Try to follow http://wiki.librecad.org/index.php/LibreCAD_Installation_from_Source#Building_LibreCAD-2.0_on_OS.2FX

DErik wrote
Where should the custom.pro reside, if it is supposed to be on the OS X platform at all? And should it include references to the boost directories in it? I don't have boost installed anyway. Do I need it on Mac?
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
In reply to this post by DErik
librecad/src/custom.pro
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
In reply to this post by DErik
I got my new iMac today.

Here was what I did:
- downloaded 2.0.8 (yosemite dmg)
-- installed and opened with no problems

- installed macports and tried "sudo port install librecad"
-- it failed after a while with:

--->  Building LibreCAD
--->  Staging LibreCAD into destroot
Error: org.macports.destroot for port LibreCAD returned: command execution failed


:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_cad_LibreCAD/LibreCAD/work/LibreCAD-2.0.8'
:debug:build Privilege de-escalation not attempted as not running as root.
:debug:destroot destroot phase started at Fri Feb  5 16:32:41 PST 2016
:notice:destroot --->  Staging LibreCAD into destroot
:debug:destroot Can't run destroot under sudo without elevated privileges (due to mtree).
:debug:destroot Run destroot without sudo to avoid root privileges.
:debug:destroot Going to escalate privileges back to root.
- downloaded qt 5.5.1 from the Qt website and installed with no problems
-- however it complained about needing Xcode

- downloaded the latest Xcode beta (5gb :O) and installed with no problems
- then in the terminal:
$ sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer
$ sudo xcodebuild -license

- built librecad in Qt creator in release mode using clang and all the defaults... with 50k+ non critical issues
-- when the program launched after building it seemed to get stuck on the loading screen
however, behind the loading screen was a dialog claiming that "plugins/plugins.pro is not a valid Mach-O binary" and then the same for plugins.sln and README.plugins
-- showing then hiding a window will also hide the loading screen so you can see those dialogs

More research is needed;
and I'll try gcc and the building instructions on the wiki tomorrow... needing sleep.


Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

dxli
I remember qt5/clang worked for me on 10.9. on 10.8 and gcc, the macports hack was needed (see our wiki).

it's probably easier to fix the MacPorts package(the MacPort package, instead of the referring to the said gcc hack) first. Ries knows better here.



Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
Adding GCC into the process seems like an unnecessary complication for OSX.
By default Qt creator is set up to use Clang, and as far as I understand it LLVM.
It builds fine... it just outputs a lot more warnings than gcc.
These can be suppressed by adding to src.pro:
QMAKE_CXXFLAGS_WARN_ON = -w
or just one of the big offenders
QMAKE_CXXFLAGS_WARN_ON = -Wno-inconsistent-missing-override

Although, it's probably smart not to commit those, incase someone is inspired to deal with the 50k issues.

The issue is that on start up 4 dialogs are presented that say:

'/Users/one/Documents/LibreCAD/plugins/Makefile' is not a valid Mach-O binary (invalid magic 23232323)

'/Users/one/Documents/LibreCAD/plugins/plugins.pro' is not a valid Mach-O binary (invalid magic 232d2d2d)

'/Users/one/Documents/LibreCAD/plugins/plugins.sln' is not a valid Mach-O binary (invalid magic 4d696372)

'/Users/one/Documents/LibreCAD/plugins/README.plugins' is not a valid Mach-O binary (invalid magic 46697273)

Any idea why this would be happening? The program successfully loads after dismissing these dialogs.
I don't even understand why these would be processed as Mach-O binaries, or where.

I did try compiling with gcc; however it always complained about unique_ptr not being part of std,
which I guess has something to do with c++11...
My research showed suggestions for:
#    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
#    QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
#    QMAKE_CFLAGS += -mmacosx-version-min=10.7
#    QMAKE_MAC_SDK = macosx10.11
#    QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
#    QMAKE_CFLAGS += -std=c++11 -stdlib=libc++
#    CONFIG += c++11

Although various tweaking of the values never solved the issue.
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas

It builds fine... it just outputs a lot more warnings than gcc.
These can be suppressed by adding to src.pro:
QMAKE_CXXFLAGS_WARN_ON = -w
or just one of the big offenders
QMAKE_CXXFLAGS_WARN_ON = -Wno-inconsistent-missing-override

Although, it's probably smart not to commit those, incase someone is inspired to deal with the 50k issues.
It seems the following is preferred:

CONFIG += warn_off

http://stackoverflow.com/questions/18667291/disable-wall-compiler-warnings-in-a-qt-project
http://doc.qt.io/qt-5/qmake-variable-reference.html#config

Curiously it will still say:
Project ERROR: muparser development package not found

Yet the cal command seems to work.
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

dxli
since muparser is included in LC by source as well

ravas wrote
It builds fine... it just outputs a lot more warnings than gcc.
These can be suppressed by adding to src.pro:
QMAKE_CXXFLAGS_WARN_ON = -w
or just one of the big offenders
QMAKE_CXXFLAGS_WARN_ON = -Wno-inconsistent-missing-override

Although, it's probably smart not to commit those, incase someone is inspired to deal with the 50k issues.
It seems the following is preferred:

CONFIG += warn_off

http://stackoverflow.com/questions/18667291/disable-wall-compiler-warnings-in-a-qt-project
http://doc.qt.io/qt-5/qmake-variable-reference.html#config

Curiously it will still say:
Project ERROR: muparser development package not found

Yet the cal command seems to work.
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
But why produce an error message? Where is it coming from?
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

DErik
In reply to this post by dxli
Sorry, guys. Been busy with other things for a while. What ravas describes about the errors seems to be pretty much what I encountered. In particular, I recall the problem about unique_ptr not being part of std. I just figured it was a bug you hadn't gotten to yet, so didn't worry about it. But it kept the thing from completing the build, so the .app never got created.

Hopefully I'll get to some more of it tomorrow. Will be pretty busy today as well.

Thanks, DErik

On Feb 7, 2016, at 3:33 PM, dxli [via LibreCAD] <[hidden email]> wrote:

since muparser is included in LC by source as well

ravas wrote
It builds fine... it just outputs a lot more warnings than gcc.
These can be suppressed by adding to src.pro:
QMAKE_CXXFLAGS_WARN_ON = -w
or just one of the big offenders
QMAKE_CXXFLAGS_WARN_ON = -Wno-inconsistent-missing-override

Although, it's probably smart not to commit those, incase someone is inspired to deal with the 50k issues.
It seems the following is preferred:

CONFIG += warn_off

http://stackoverflow.com/questions/18667291/disable-wall-compiler-warnings-in-a-qt-project
http://doc.qt.io/qt-5/qmake-variable-reference.html#config

Curiously it will still say:
Project ERROR: muparser development package not found

Yet the cal command seems to work.



If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/dev-environment-setup-and-usage-tp5712883p5712918.html
To unsubscribe from dev environment setup and usage, click here.
NAML

-- DErik --

Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

Sextant_IT_Consulting
In reply to this post by DErik
I am working on Amazon Web Services EC2,  would there be a place for said EC2 in development?  From my readings and study of EC2, developers do use it.
Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
LibreCAD is a C++ / Qt project.
https://en.wikipedia.org/wiki/Qt_(software)
Reply | Threaded
Open this post in threaded view
|

Re: Re: dev environment setup and usage

Sextant_IT_Consulting
Yes I know, are you saying AWS (Amazon Web Services) can not help?

---- On Tue, 09 Feb 2016 22:57:04 -0500 ravas [via LibreCAD] <ml-node+s1049103n5712939h63@n5.nabble.com> wrote ----

 LibreCAD is a C++ / Qt project.
https://en.wikipedia.org/wiki/Qt_(software)
 
   If you reply to this email, your message will be added to the discussion below:
 http://forum.librecad.org/dev-environment-setup-and-usage-tp5712883p5712939.html 
  To start a new topic under LibreCAD-dev, email ml-node+s1049103n4361976h10@n5.nabble.com
 To unsubscribe from dev environment setup and usage, click here.
 NAML




Reply | Threaded
Open this post in threaded view
|

Re: Re: dev environment setup and usage

ravas
We can do pretty much anything with the framework we are using;
it's just a matter of doing the work.

Start a different topic if you have ideas you want to discuss regarding this.

Reply | Threaded
Open this post in threaded view
|

Re: dev environment setup and usage

ravas
In reply to this post by ravas
If I remove plugins.pro, plugins.sln and README.plugins from my local repository,
then when I open the .app file it will not produce those "is not a valid Mach-O binary" dialogs.
So the question is: why would the app file be looking in the repository for those files?
12