[SOLVED] Build on Fedora 29

Having trouble installing or compiling FreeCAD? Get help here.
Post Reply
mtsinc
Posts: 23
Joined: Tue Apr 24, 2018 12:40 pm

[SOLVED] Build on Fedora 29

Post by mtsinc » Mon Mar 04, 2019 7:44 pm

I've a nice laundry list for FreeCAD, mostly having to do with making it more conformant with generally-accepted GUI practices and I'd like to see if I can implement them, but I'm afraid the current CompileOnLinux instructions are letting me down.

This is what I've seen when following the "Out-of-source build" instructions

[timh@a64a freecad]$ uname -a
Linux a64a.mousetech.com 4.20.13-200.fc29.x86_64 #1 SMP Wed Feb 27 19:42:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[timh@a64a freecad]$ cat /etc/redhat-release
Fedora release 29 (Twenty Nine)
[timh@a64a freecad]$ mkdir freecad-build
[timh@a64a freecad]$ cd freecad-build/
[timh@a64a freecad-build]$ cmake ../freecad-code -DCMAKE_BUILD_TYPE=Debug .
CMake Error: The source directory "/home/timh/freecad/freecad-build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

CMake is 3.12.1, gcc is 8.3.1 (20190223), g++ is same (Red Hat 8.3.1-2)

Also, when I build in-source, I get this troubling message:

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libboost_python.a(list.o): relocation R_X86_64_PC32 against symbol `PyList_Type' can not be used when making a shared object; recompile with -fPIC

This is for boost-python2-1.66.0-14
Last edited by mtsinc on Thu Mar 07, 2019 5:11 pm, edited 1 time in total.

Jee-Bee
Posts: 2147
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Build on Fedora 29

Post by Jee-Bee » Mon Mar 04, 2019 8:33 pm

This has nothing to do with techdraw. Please can one of the moderators move this topic to install/ compile?

mtsinc
Posts: 23
Joined: Tue Apr 24, 2018 12:40 pm

Re: Build on Fedora 29

Post by mtsinc » Thu Mar 07, 2019 2:13 pm

Thanks. I looked for a more suitable forum, but somehow was blind.

Actually, I wonder about FreeCAD and Fedora 29 in general. All sorts of things broke when I upgraded from Fedora 28. I downloaded the SRPM for FreeCAD and it fails to build.

Thankfully, AppImage works. Plus, I've become addicted to several features of FreeCAD 18, anyway, so the official release would be a painful step back.

paullee
Posts: 2786
Joined: Wed May 04, 2016 3:58 pm

Re: Build on Fedora 29

Post by paullee » Thu Mar 07, 2019 2:35 pm

Hi, I am not a programmer.

Recently, for debugging, I use a numbers of days in trying compiling on Fedora 29 also.

Successfully to build 'In- source' , though not fully tested afterwards.

UsIng appImagr akso.

https://forum.freecadweb.org/viewtopic. ... 1&start=10

mtsinc
Posts: 23
Joined: Tue Apr 24, 2018 12:40 pm

Re: Build on Fedora 29

Post by mtsinc » Thu Mar 07, 2019 5:10 pm

Thanks! It looks like the USE_EXTERNAL_PIVY might be what did the trick.

I did have to completely delete my current project and re-pull it, though. There is, alas, apparently no "clean" option for what CMake does.

Would have been nice to use the out-of-source build option, though.

mtsinc
Posts: 23
Joined: Tue Apr 24, 2018 12:40 pm

Re: [SOLVED] Build on Fedora 29

Post by mtsinc » Tue Apr 16, 2019 9:06 pm

Solved again! Didn't even need PIVY this time. I've learned somewhat about CMake.

To separate source and build starting from git, this command sequence will work:

NOTE: My current project requires nearly 9GB of disk space!

Code: Select all

# 1. Pull the source archive and override its root directory name locally:
$ git clone (freecard repo url) freecad-code
# 2. Create the build/doc directory:
$ mkdir freecad-build
# 3. CMake the Makefiles:
$ CMake -S freecad-code -B freecad-build
# 4. Now cd and build:
$ cd freecad-build
$ make
# 5. Optionally, make documentation
$ make DevDoc
As a shell script, edit as needed:

Code: Select all

#!/bin/sh
# 1. Pull the source archive and override its root directory name locally:
FREECODE_REPO_URL=TBS
git clone ${FREECODE_REPO_URL} freecad-code
# 2. Create the build/doc directory:
mkdir freecad-build
# 3. CMake the Makefiles:
CMake -S freecad-code -B freecad-build
# 4. Now cd and build:
cd freecad-build
make
# 5. Optionally, make documentation
make DevDoc

User avatar
kkremitzki
Posts: 2170
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: [SOLVED] Build on Fedora 29

Post by kkremitzki » Tue Apr 16, 2019 10:01 pm

Glad to hear you got it working--and I bet the DevDocs are making up a big chunk of that size, IIRC they're pretty big.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.

Post Reply