bugGNU Octave - Bugs: bug #51758, [octave forge] (interval) fails to...

 
 

bug #51758: [octave forge] (interval) fails to build on non-x86 archs

Submitter:  Colin Macdonald <cbm>
Submitted:  Tue 15 Aug 2017 07:40:52 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 19 Aug 2017 12:16:55 PM UTC, comment #9: 

I have improved SSE2 detection further in

https://sourceforge.net/p/octave/interval/ci/add2b34bf96bf317e2fcee8b05be2d8fc7e6b19f/

To use cat /proc/cpuinfo doesn't work on Windows and doesn't allow cross-compilation.

Oliver Heimlich <oheim>
Wed 16 Aug 2017 09:14:48 PM UTC, comment #8: 

Works for me, thanks.

Mike Miller <mtmiller>
Group Member
Wed 16 Aug 2017 09:04:53 PM UTC, comment #7: 

No need to send a patch, I have fixed it in the repository already.

https://sourceforge.net/p/octave/interval/ci/db753bae44b3b0ac58af3c7556a1d342cfeeb105/

Actually, I thought that this has already been fixed because the original changeset has been patched into the Debian repository. Then I realized: In Debian the auto-detection is overridden by this:

ifeq ($(DEB_HOST_ARCH_CPU),amd64)
export CONF_FLAG_SSE2 = --enable-sse2
else
export CONF_FLAG_SSE2 = --disable-sse2
endif


P.S. Many thanks for packaging @ Fedora.

This bug may be closed.

Oliver Heimlich <oheim>
Wed 16 Aug 2017 08:45:56 PM UTC, comment #6: 

Thanks!  With that, it builds on all Fedora arches.  Do you want me to send a patch?

FYI, here's the Fedora request for package review:
https://bugzilla.redhat.com/show_bug.cgi?id=1481604

Colin Macdonald <cbm>
Wed 16 Aug 2017 05:15:55 AM UTC, comment #5: 

The correct syntax should be: ifneq ($(HAS_SSE2),)

Anonymous
Wed 16 Aug 2017 02:20:37 AM UTC, comment #4: 

Agree, this is not fixed by the current changes in the repo, I tested similarly by changing the argument to findstring.

Mike Miller <mtmiller>
Group Member
Wed 16 Aug 2017 02:02:05 AM UTC, comment #3: 


> Seems to me we should just have ...


No no, that's not right because it will just be "sse2" rather then "--enable-sse2".  I think I'll let someone who speaks Make fix this properly!  The logic should be:


HAS_SSE2       =$(findstring WTF,$(shell cat /proc/cpuinfo))
if_not_empty HAS_SSE2
CONF_FLAG_SSE2 ?=--enable-sse2
endif


Colin Macdonald <cbm>
Wed 16 Aug 2017 01:51:32 AM UTC, comment #2: 

It doesn't work for me.

I cherry-picked that patch.  But I always get --enable-sse2, independent of what is in /proc/cpuinfo.

For example, I has findstring for "WTF" instead of "sse2":

HAS_SSE2       =$(findstring WTF,$(shell cat /proc/cpuinfo))
ifdef HAS_SSE2
CONF_FLAG_SSE2 ?=--enable-sse2
endif


And I still get --enable-sse2.  Perhaps HAS_SSE2 is defined but empty: [1] says "if it occurs, the value is find; otherwise, the value is empty."

[1] https://www.gnu.org/software/make/manual/html_node/Text-Functions.html

Seems to me we should just have:

CONF_FLAG_SSE2 =$(findstring sse2,$(shell cat /proc/cpuinfo))


But I don't know how to support &quot;?=&quot; with such (which I guess was the reason for the "ifdef HAS_SSE2" stuff.)

Colin Macdonald <cbm>
Tue 15 Aug 2017 07:45:38 AM UTC, comment #1: 

It has been fixed already and will be part of the next release after Google summer of code.

https://sourceforge.net/p/octave/interval/ci/f76c17d11bc7fda7f6747464134519a80d779867

Anonymous
Tue 15 Aug 2017 07:40:52 AM UTC, original submission:  

I'm trying to package octave-interval for Fedora.  It works fine on x86 but fails on arm, ppc, etc. 

There are various logs here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=21237837

(click on one of the red failures), then click on "build.log".

Here's an excerpt:


make[3]: Leaving directory '/builddir/build/BUILD/interval-2.1.0/build/interval-2.1.0/src/crlibm/scs_lib'
Making all in .
make[3]: Entering directory '/builddir/build/BUILD/interval-2.1.0/build/interval-2.1.0/src/crlibm'
gcc -DHAVE_CONFIG_H -I.    -std=c99 -Wall -msse2 -mfpmath=sse  -fPIC -Wno-div-by-zero -Wno-unused-variable -Wno-unused-but-set-variable -c -o crlibm_private.o crlibm_private.c
gcc: error: unrecognized command line option '-msse2'
gcc: error: unrecognized command line option '-mfpmath=sse'
make[3]: Leaving directory '/builddir/build/BUILD/interval-2.1.0/build/interval-2.1.0/src/crlibm'
make[3]: *** [Makefile:599: crlibm_private.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/interval-2.1.0/build/interval-2.1.0/src/crlibm'
make[1]: Leaving directory '/builddir/build/BUILD/interval-2.1.0/build/interval-2.1.0/src/crlibm'
make[2]: *** [Makefile:632: all-recursive] Error 1
make[1]: *** [Makefile:502: all] Error 2
make: *** [Makefile:38: crlibm/crlibm_private.o] Error 2
make: *** Waiting for unfinished jobs....


So it looks like there is some hardcoded sse stuff in there?

Colin Macdonald <cbm>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by oheim (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by cbm (Submitted the item)
  • -email is unavailable- added by cbm
  •  

    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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 jwe Summary[octave-forge] (interval) fails to build on non-x86 archs [octave forge] (interval) fails to build on non-x86 archs
    2017-08-16 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2017-08-16 mtmiller StatusFixed Confirmed
        Open/ClosedClosed Open
    2017-08-15 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2017-08-15 cbm Carbon-Copy- Added oheim

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code