bugGNU Octave - Bugs: bug #34663, OpenBSD Build Failure with regards...

 
 

bug #34663: OpenBSD Build Failure with regards to sigaddset()

Submitter:  Edd Barrett <vext01>
Submitted:  Wed 26 Oct 2011 11:16:08 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.4.3 Operating System:  * BSD
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 06 Aug 2013 03:50:53 PM UTC, comment #10: 

It's not good. I started a build of a current mercurial snapshot with the intent of looking into bug #35588. The build failed in oct-time.cc with an error in gnulib's sys/time.h. That's as far as I've gotten, I'll try to get past that and on to the next error when I have time to work on it.

Mike Miller <mtmiller>
Group Member
Sun 23 Jun 2013 10:21:58 PM UTC, comment #9: 

Can someone verify how the development branch of Octave from Mercurial builds on OpenBSD?  The build process has really been re-worked and we use Autconf and gnulib quite a lot to try and get better cross-platform building.

Rik <rik5>
Group administrator
Tue 21 Feb 2012 07:52:38 PM UTC, comment #8: 

I can conform that this breakage is still upon us:


/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src -I..  -I/usr/local/include -I/usr/X11R6/include -I../libgnu -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/libgnu -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/libcruft/misc -I../liboctave -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/liboctave -I. -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src -I/usr/local/include -I/usr/X11R6/include -O2 -pipe  -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -pipe -pthread -O2 -pipe -MT liboctinterp_la-sighandlers.lo -MD -MP -MF .deps/liboctinterp_la-sighandlers.Tpo -c -o liboctinterp_la-sighandlers.lo `test -f 'sighandlers.cc' || echo '/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/'`sighandlers.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src -I.. -I/usr/local/include -I/usr/X11R6/include -I../libgnu -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/libgnu -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/libcruft/misc -I../liboctave -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/liboctave -I. -I/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src -I/usr/local/include -I/usr/X11R6/include -O2 -pipe -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -pipe -pthread -O2 -pipe -MT liboctinterp_la-sighandlers.lo -MD -MP -MF .deps/liboctinterp_la-sighandlers.Tpo -c /usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc  -fPIC -DPIC -o .libs/liboctinterp_la-sighandlers.o
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc: In function 'void my_friendly_exit(const char*, int, bool)':
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc:172: warning: use of old-style cast
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc:198: warning: use of old-style cast
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc: In function 'octave_interrupt_handler octave_ignore_interrupts()':
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc:498: warning: use of old-style cast
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc: In function 'void install_signal_handlers()':
/usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/src/sighandlers.cc:638: warning: use of old-style cast
{standard input}: Assembler messages:
{standard input}:7081: Error: symbol `sigaddset' is already defined
gmake[3]: *** [liboctinterp_la-sighandlers.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/pobj/octave-3.6.1-rc0/build-amd64/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/pobj/octave-3.6.1-rc0/build-amd64/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/pobj/octave-3.6.1-rc0/build-amd64'
gmake: *** [all] Error 2
*** Error code 2


Edd Barrett <vext01>
Mon 20 Feb 2012 08:46:48 PM UTC, comment #7: 

Could the original report re-verify whether this is still a problem with a new 3.6.1 release candidate (ftp://alpha.gnu.org/gnu/octave/)?  If it is, the problem needs to be reported to the gnulib bug tracker since it is not strictly an issue with Octave code.  Since the goal of gnulib is to have cross-platform portability I think they would be fairly motivated to figure out why base functions are failing on a well-known OS like OpenBSD.

Rik <rik5>
Group administrator
Fri 04 Nov 2011 08:46:36 PM UTC, comment #6: 

OK, so if I remove all of the gnulib:: namespacing from sighandlers.cc octave actually runs!

So the gnulib signal handler funcs do not work on OpenBSD.

Patch I used attached - not sure how you plan to work around this upstream.

(file #24303)

Edd Barrett <vext01>
Fri 04 Nov 2011 01:27:22 PM UTC, comment #5: 

Hi John,

Having worked around #34725, we should figure out what is wrong here. I had previously applied a patch which worked around a build error. I am attaching it.

With this patch applied, I get the following seg:

(gdb) run
Starting program: /usr/ports/pobj/octave-3.4.3/octave-3.4.3/src/.libs/octave

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 1419, thread 0x88dd3400]
0x0948d51d in octave_set_signal_handler (sig=2,
    handler=0x948e050 <sigint_handler>, restart_syscalls=true)
    at sighandlers.cc:225
225       gnulib::sigemptyset (&act.sa_mask);
Current language:  auto; currently c++
(gdb) bt
#0  0x0948d51d in octave_set_signal_handler (sig=2,
    handler=0x948e050 <sigint_handler>, restart_syscalls=true)
    at sighandlers.cc:225
#1  0x0948d600 in octave_catch_interrupts () at sighandlers.cc:460
#2  0x0948d6c8 in install_signal_handlers () at sighandlers.cc:529
#3  0x0945cce5 in octave_main (argc=1, argv=0xcfbd89e0, embedded=0)
    at octave.cc:665
#4  0x1c00093a in main (argc=536914932, argv=0x88fdb078) at main.c:35


What is supposed to happen here, am I supposed to be using gnulib replacements? OpenBSD has implementations of both sigaddset and sigemptyset.

It looks here like I am mixing implementations, so in a way it does not surprise me that this does not work.

Can you comment? Did the build system do the right thing in choosing gnulib? If so, the original assembler message is our blocker, otherwise, the build system erroneously chose to replace system functions.

Can you comment?

(file #24301)

Edd Barrett <vext01>
Mon 31 Oct 2011 01:01:52 PM UTC, comment #4: 

Any idea?

Edd Barrett <vext01>
Fri 28 Oct 2011 09:29:36 AM UTC, comment #3: 

For what it is worth, I have the same failure with  gcc/g++-4.2.4

Edd Barrett <vext01>
Thu 27 Oct 2011 11:04:46 PM UTC, comment #2: 

Standard OpenBSD GCC:

% gcc --version
gcc (GCC) 4.2.1 20070719
Copyright (C) 2007 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.

Edd Barrett <vext01>
Thu 27 Oct 2011 01:31:37 AM UTC, comment #1: 

I have no clue what could cause an assembler failure like that.  What version of GCC are you using?

John W. Eaton <jwe>
Group administrator
Wed 26 Oct 2011 11:16:08 PM UTC, original submission:  

Hi,

Using the 3.4.3 release tarball, the build fails like this on OpenBSD-current/amd64:


/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/local/include -I/usr/X11R6/include -I../libgnu -I../libgnu -I../libcruft/misc -I../liboctave -I../liboctave -I. -I.  -I/usr/local/include -I/usr/X11R6/include -g -O2  -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -g -O2 -MT liboctinterp_la-sighandlers.lo -MD -MP -MF .deps/liboctinterp_la-sighandlers.Tpo -c -o liboctinterp_la-sighandlers.lo `test -f 'sighandlers.cc' || echo './'`sighandlers.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/X11R6/include -I../libgnu -I../libgnu -I../libcruft/misc -I../liboctave -I../liboctave -I. -I. -I/usr/local/include -I/usr/X11R6/include -g -O2 -DHAVE_CONFIG_H -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -pthread -g -O2 -MT liboctinterp_la-sighandlers.lo -MD -MP -MF .deps/liboctinterp_la-sighandlers.Tpo -c sighandlers.cc  -fPIC -DPIC -o .libs/liboctinterp_la-sighandlers.o
sighandlers.cc: In function 'void my_friendly_exit(const char*, int, bool)':
sighandlers.cc:159: warning: use of old-style cast
sighandlers.cc:185: warning: use of old-style cast
sighandlers.cc: In function 'octave_interrupt_handler octave_ignore_interrupts()':
sighandlers.cc:492: warning: use of old-style cast
sighandlers.cc: In function 'void install_signal_handlers()':
sighandlers.cc:632: warning: use of old-style cast
/tmp//ccBLpzmW.s: Assembler messages:
/tmp//ccBLpzmW.s:15621: Error: symbol `sigaddset' is already defined
gmake[3]: *** [liboctinterp_la-sighandlers.lo] Error 1


Whilst I can kludge this to use the non-gnulib implementation (which is included in OpenBSD and is not a macro), I feel that this is not the right thing to do.

I am attaching a config.log and a build log.

I am hoping to find a developer who is interested in helping OpenBSD update their ancient port (as there are other build failures after this). If anyone is interested, please drop me a private email on <edd at openbsd dot org>. Cheers.
                                                                

NOTE, please don't ask me to try the hg tip, as the bootstrap process does not work on OpenBSD. I am unable to make a configure script. We can tackle this later.

Edd Barrett <vext01>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #24303:  patch-src_sighandlers_cc added by vext01 (1KiB - application/octet-stream)
file #24301:  patch-src_sighandlers_cc added by vext01 (568B - application/octet-stream - incorrect workaround for signal handler compiler error)
file #24210:  config.log.gz added by vext01 (114KiB - application/gzip - Build log and config.log (gzipped))
file #24209:  LOG.gz added by vext01 (53KiB - application/gzip - Build log and config.log (gzipped))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by vext01 (Submitted the item)
  • -email is unavailable- added by vext01 (me)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-14 rik5 Open/ClosedOpen Closed
    2013-06-23 rik5 StatusNone Need Info
    2011-11-04 vext01 Attached File- Added patch-src_sighandlers_cc, #24303
    2011-11-04 vext01 Attached File- Added patch-src_sighandlers_cc, #24301
    2011-10-26 vext01 Attached File- Added LOG.gz, #24209
        Attached File- Added config.log.gz, #24210
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code