bugGNU Octave - Bugs: bug #34301, Can't compile oct files using gcc...

 
 

bug #34301: Can't compile oct files using gcc -fvisibility=hidden option

Submitted by:  None
Submitted on:  Thu 15 Sep 2011 09:19:46 PM UTC  
 
Category: Configuration and Build SystemSeverity: 1 - Wish
Priority: 3 - LowItem Group: Feature Request
Status: Need InfoAssigned to: None
Originator Name: Andrew RossOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 14 Feb 2015 05:28:16 PM UTC, comment #5:

Yes, I've just done so. Looks like this bug is waiting for some more information from the requester.

Mike Miller <mtmiller>
Project Administrator
Sat 14 Feb 2015 01:49:43 PM UTC, comment #4:

@Mike: The priority on this is marked low. Should I make it WON'T FIX for the 4.0 release list (http://wiki.octave.org/Bug_Fix_List_-_4.0_Release#Bugs_marked_Configuration_and_Build_System)

Rik <rik5>
Project Administrator
Thu 27 Mar 2014 11:56:09 PM UTC, comment #3:

This might be useful information for someone interested in working on this problem. The following warnings appear when compiling the array classes under liboctave:

These might be related to the link errors I get when trying to link the octave-cli and octave-gui executables at the end of the build.

Mike Miller <mtmiller>
Project Administrator
Thu 27 Mar 2014 11:43:30 PM UTC, comment #2:

Still unable to compile Octave itself with -fvisibility=hidden, fixed the patch to the following:

With a default build of Octave, there is no change, everything works as it used to. So I just want to understand better what this change is actually supposed to help with, is Octave supposed to be able to be built with hidden symbols, or is it only for the benefit of external packages that are linking against the Octave libraries (that still expose the full set of library symbols in their dynamic symbol table)?

Mike Miller <mtmiller>
Project Administrator
Thu 27 Mar 2014 04:41:23 AM UTC, comment #1:

This suggested change has no noticable effect on compiling Octave with gcc with a default configure run.

Was the suggestion in the report that Octave itself should be able to be built with the -fvisibility=hidden gcc option, or was that meant to suggest that third-party projects could compile with that option and still link properly with the Octave libraries? The gcc wiki page seems to imply that the shared library itself should be built with this option.

If that's correct, then that does not currently work for me.
Trying to build Octave with -fvisibility=hidden results in many link errors when the octave-cli and octave-gui executables are built. Let me know if I'm doing something wrong.

Attached patch is the change I am building with.

(file #31054)

Mike Miller <mtmiller>
Project Administrator
Thu 15 Sep 2011 09:19:46 PM UTC, original submission:

The OCTAVE_EXPORT macro defined in oct-dlldefs.h is empty on gcc. Defining it for gcc using

#define OCTAVE_EXPORT _attribute_ ((visibility ("default")))

will allow oct code to be compiled using the gcc -fvisibility=hidden option, which by default does not export any symbols. See http://gcc.gnu.org/wiki/Visibility for a brief overview of why this is a good idea.

This bug report originates from work on the octave bindings for plplot using swig. The relevant thread showing the discussion and our temporary workaround is
http://www.mail-archive.com/plplot-devel@lists.sourceforge.net/msg04950.html

Regards

Andrew

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #31054:  visibility.diff added by mtmiller (549B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Mar 2014 11:43:30 PM UTCmtmillerPriority5 - Normal=>3 - Low
    Thu 27 Mar 2014 04:41:23 AM UTCmtmillerAttached File-=>Added visibility.diff, #31054
      Severity3 - Normal=>1 - Wish
      StatusNone=>Need Info
      Release3.2.4=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1