bugGNU Octave - Bugs: bug #44640, strings package: fails to compile...

 
 

bug #44640: strings package: fails to compile in windows

Submitter:  John Donoghue <lostbard>
Submitted:  Thu 26 Mar 2015 08:52:41 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  JohnD Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Jun 2015 09:51:30 PM UTC, comment #5: 

I have also added the PCRE_CPPFLAGS in the Makefile. The package installs cleanly on Octave Windows now using the pkg command.

Oliver Heimlich <oheim>
Mon 01 Jun 2015 06:31:52 PM UTC, comment #4: 

Thanks for the PCRE_CPPFLAGS hint. I can easily add that too.

I think that cross-compilation is no “official” use case for the src/Makefile at the moment. You probably have to adjust other Makefiles, which make use of $(OCTAVE), for cross-compilation as well.

Oliver Heimlich <oheim>
Mon 01 Jun 2015 06:06:38 PM UTC, comment #3: 

This is the same kind of change I made in the communications package to find the values of HDF5_* variables.

Oliver: You probably want to use the value of PCRE_CPPFLAGS as well, even if it is empty for most distros, and maybe even MXE, you probably shouldn't depend on that being true. Can you add that as well?

Cross-compiling is a separate issue, if that's something important we should probably open a bug for mkoctfile to put out more useful variables.

Mike Miller <mtmiller>
Group Member
Mon 01 Jun 2015 04:21:09 PM UTC, comment #2: 

The only issue I see with this is that mxe-octave wont be able to use the value of octave_config_info during the mxe build process as it is cross compiled binary.

It should however work for a standard -forge install in Windows

John Donoghue <lostbard>
Group Member
Mon 01 Jun 2015 03:36:02 PM UTC, comment #1: 

I have patched the Makefile in the Octave Forge repository with a mechanism that uses octave_config_info from Octave for the correct compile switches.

The bug can be closed.

Oliver Heimlich <oheim>
Thu 26 Mar 2015 08:52:41 PM UTC, original submission:  

On running both the released, and whats in mercurial for the strings package:


>> pkg install -verbose -forge -nodeps strings
mkdir (C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW)
untar (C:\Users\jdonoghue.ECE\strings-1.1.0.tar.gz, C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW)
make: Entering directory `/tmp/oct-cNUfgW/strings/src'
mkoctfile -Wall pcregexp.cc
pcregexp.o: In function `Z9FpcregexpRK17octave_value_listi':
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:60: undefined reference to `pcre_compile'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:69: undefined reference to `pcre_fullinfo'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:73: undefined reference to `pcre_exec'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:86: undefined reference to `pcre_get_substring_list'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:90: undefined reference to `pcre_free'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:110: undefined reference to `pcre_free_substring_list'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:111: undefined reference to `pcre_free'
C:\Users\JDONOG~1.ECE\AppData\Local\Temp\oct-cNUfgW\strings\src/pcregexp.cc:78: undefined reference to `pcre_free'
collect2.exe: error: ld returned 1 exit status
make: *** [pcregexp.oct] Error 1
make: Leaving directory `/tmp/oct-cNUfgW/strings/src'


It doesn't like the way the Makefile is trying to find the libraries, most likely due to windows file names having the '\' in them.

If

PCRE_LIBS := $(shell  grep "\#define OCTAVE_CONF_PCRE_LIBS"  $(shell  $(MKOCTFILE) -p OCTINCLUDEDIR)/oct-conf.h | sed 's/^.*LIBS //;s/"//g'  )


is changed to


PCRE_LIBS := $(shell pcre-config --libs)


It compiles OK.

The issue of course will then be systems that don't have pcre-config


John Donoghue <lostbard>
Group Member

 

(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

Digest:
   bug dependencies.

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-06 mtmiller StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2015-06-03 mtmiller Dependencies- bugs #45250 is dependent
    2015-06-01 mtmiller StatusNone In Progress
    2015-05-31 mtmiller Summaryoctave-forge strings fails to install in windows strings package: fails to compile in windows

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code