Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 23-02-2016, 18:59   #1
Registered User

Join Date: Feb 2015
Posts: 6
compile error Linux Fedora Rawhide

Dear CPNers,

I am trying to compile OpenCPN master module, after githubbed it.
With Fedora Rawhide and encontered the following error ( binutils )
at make step:
/usr/bin/ld: CMakeFiles/opencpn.dir/src/chart1.cpp.o:
relocation R_X86_64_32 against `_ZN5MyApp13sm_eventTableE'
can not be used when making a shared object;
recompile with -fPIC I had the same issue with Fedora 23...
Any suggestion is welcome.

Thanks !
__________________

__________________
Lucodealethea is offline   Reply With Quote
Old 24-02-2016, 02:38   #2
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: compile error Linux Fedora Rawhide

Hi,

Do you use -DPREFIX=somepath option in cmake?

It's removed four months ago in https://github.com/OpenCPN/OpenCPN/c...06a8a995225fab because it broke build with cmake 3.3.2 (used in recent Fedora).
I had these linking relocation issues when building Fedora packages, thus this patch.

You should use -DCMAKE_INSTALL_PREFIX instead.

If your not using -DPREFIX, what options are you using so I try to reproduce this.

BTW, opencpn is already available in my fedora repo with a few plugins already packaged and ready to use with no hassle ;-)

Regards,
Jean-Eudes
__________________

__________________
SethDart is offline   Reply With Quote
Old 24-02-2016, 04:19   #3
Registered User

Join Date: Feb 2015
Posts: 6
Re: compile error Linux Fedora Rawhide

Hello,

I 'll check the CMakeLists.txt and try with
-DCMAKE_INSTALL_PREFIX instead.

Had no issue with Centos7 ( older kernel) and OpenSuse latest (4.1.15).

Compiler in rawhide is for 4.5 kernel. So I need to figure it out other details, but will keep posted with directives and if any success.

Many Thanks for your prompt reply.

Luc
__________________
Lucodealethea is offline   Reply With Quote
Old 25-02-2016, 11:12   #4
Registered User

Join Date: Feb 2015
Posts: 6
Re: compile error Linux Fedora Rawhide

Is it a bug with Fedora 23, still unfixed in rawhide ?
The easiest walkaround was to remove :

-specs=/usr/lib/rpm/redhat/redhat-hardened-ld

from the main dir link.txt
__________________
Lucodealethea is offline   Reply With Quote
Old 27-02-2016, 08:12   #5
Registered User

Join Date: Feb 2015
Posts: 6
Re: compile error Linux Fedora Rawhide

Fedora now hardens as many packages as possible with position-independent code (ASLR) and FULL RELRO to reduce the impact of certain potential security vulnerabilities.

https://fedoraproject.org/wiki/Chang...n_All_Packages

You might want to ask and what is the benefit for Fedora users:

Packages in Fedora will be more secure than in other distributions or packages provided by upstream. Therefore our users less likely become victims of attacks. Fedora will use more state-of-the-art security mechanisms to fulfill its first and features foundations.

The current compiling instructions for OpenCPN use dynamic linking libraries, and fedora 23 hardens all the links. I adjusted back manually to dynamic by
removing -specs=/usr/lib/rpm/redhat/redhat-hardened-ld

/home/opencpn/Downloads/fromcentos/work/OpenCPN/build/CMakeFiles/opencpn.dir/link.txt
AFTER cmake

and before make

compiling steps
__________________
Lucodealethea is offline   Reply With Quote
Old 09-05-2016, 18:00   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
Re: compile error Linux Fedora Rawhide

Perhaps someone can shed further light on these Tracker Items??

FS#1900 : After upgrading to Fedora 23 , OpenCPN won't start :

FS#1981 - 64 bit "Fedora 23" OpenCPN crashes w/ SIGSEGV, Segmentation fault during chart init

FS#1901 : Won't build on 64 bit Fedora 23 : chart1.cpp.o: relocation R_X86_64_32 against `_ZN5MyApp13sm_eventT

FS#1777 : In Download page OpenSUSE icon points toward old releases
__________________

__________________
rgleason is offline   Reply With Quote
Reply

Tags
linux

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wxWidgets compile error wushinwei OpenCPN 5 10-05-2015 05:42
Compile on VS 2010 with one error? Glen96 OpenCPN 3 07-12-2014 17:15
OpenCPN Linux compile problems rvsjimbo OpenCPN 1 07-12-2013 16:31
Fedora Compile Link Error oystercatcher OpenCPN 4 16-12-2010 16:37



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:29.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.