Building from Source

Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
kc
Reply | Threaded
Open this post in threaded view
|

Building from Source

kc
For a new contributor the 'Building from Source' page https://docs.librecad.org/en/latest/appx/build.html seems to have some important missing information.

Building for Linux:  The page suggests at you should install dt5-default - apparently this was removed from Ubuntu in version 21.04 - I don't know about other distros, but perhaps reference to this should be removed.

The next suggestion is to "use qtchooser prior to running qmake; qtchooser -qt5"

This syntax for running qtchooser seems to be invalid - it doesn't want to accept -qt5 as an argument.

I found that the following worked for me:
qtchooser -run-tool=qmake -qt=5 -r librecad.pro

It might also be worth mentioning that the syntax to get a debug build is:
qtchooser -run-tool=qmake -qt=5 -r CONFIG+=debug librecad.pro

The third problem I encountered is that having done all that it didn't actually build.  Eventually I figured out that the master branch isn't for qt5 - but qt6.  So I would suggest the instructions should say to use the 2.2.1 branch - or is there a qt5-devBranch?   I know this is mentioned in the readme in github, but it's still an obstacle for new contributors.





Reply | Threaded
Open this post in threaded view
|

Re: Building from Source

dxli
Yes, it's a good idea to update README.md for each version.

Aside from that, I also started to add scripts like: scripts/create-win-env.bat , to create building environment for new developers.

we can also do the similar for Linux (at least handle apt/rpm/pacman/portage) and macOS. Of course, those scripts have to be maintained.

For Qt dependency, the current github page is correct to mention:

Qt5 for 2.2.1
Qt6.4 or later for 2.2.2(master).

I'm using macOS mostly, but for 2.2.1/Qt5, I choose to use a debian virtual machine to avoid switching between qt5/qt6

kc wrote
For a new contributor the 'Building from Source' page https://docs.librecad.org/en/latest/appx/build.html seems to have some important missing information.

Building for Linux:  The page suggests at you should install dt5-default - apparently this was removed from Ubuntu in version 21.04 - I don't know about other distros, but perhaps reference to this should be removed.

The next suggestion is to "use qtchooser prior to running qmake; qtchooser -qt5"

This syntax for running qtchooser seems to be invalid - it doesn't want to accept -qt5 as an argument.

I found that the following worked for me:
qtchooser -run-tool=qmake -qt=5 -r librecad.pro

It might also be worth mentioning that the syntax to get a debug build is:
qtchooser -run-tool=qmake -qt=5 -r CONFIG+=debug librecad.pro

The third problem I encountered is that having done all that it didn't actually build.  Eventually I figured out that the master branch isn't for qt5 - but qt6.  So I would suggest the instructions should say to use the 2.2.1 branch - or is there a qt5-devBranch?   I know this is mentioned in the readme in github, but it's still an obstacle for new contributors.