1

Following this guide:

https://github.com/fritzing/fritzing-app/wiki/1.3-Linux-notes

I get this error:

/usr/bin/ld: /home/user/fritzing/fritzing-app/../libgit2/build/libgit2.a(xprepare.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile.Release:1091: recipe for target 'Fritzing' failed
make[1]: *** [Fritzing] Error 1
make[1]: Leaving directory '/home/user/fritzing/fritzing-app'
Makefile:42: recipe for target 'release' failed
make: *** [release] Error 2
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:   bionic

$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ qmake --version
QMake version 3.1
Using Qt version 5.14.2 in /home/jeremy/Qt5.14.2/5.14.2/gcc_64/lib

I have not done C++ in a while so I am not familiar with this error.

Martin Konrad
  • 1,075
  • 1
  • 10
  • 20
jeremyvillalobos
  • 1,795
  • 2
  • 19
  • 39
  • `recompile with -fPIC` This may help: [https://stackoverflow.com/questions/13812185/how-to-recompile-with-fpic](https://stackoverflow.com/questions/13812185/how-to-recompile-with-fpic) – drescherjm May 25 '20 at 01:53

2 Answers2

2

I was struggling with the same issue and managed to build after many failed attempts.

For the record, I am following the Fritzing wiki (recommend to start from there, if you are trying to build for the first time).

Downloaded the Fritzing source code from GitHub and checked out the 0.9.6 tag/branch.

Running this on Ubuntu 20.04 with QT5 and gcc 9.3.0.

WHAT WORKED

Build using libgit2 dynamic library contrary to what suggested in the wiki and doc.

Skip the this.

Go to the phoenix.pro file and set LIBGIT_STATIC = false.

Make sure that you have the libgit2 package installed by running:

sudo apt install libgit2-dev

The build works.

WHAT DID NOT WORK

I could not find the ./configure command/file and recompile using the -fPIC option.

janclod
  • 21
  • 4
0

The best option is to install using apt (or any application installer that the operating uses i.e. yum install etc)

sudo apt install fritzing

and to run

fritzing