OSSP CVS Repository

ossp - Ticket #207
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Attach]  [Edit]  [History

Ticket 207: Build error with MinGW cross-compilation

A MinGW build fails with

  libtool: install: ./shtool install -c -m 755 -s .libs/uuid /nix/store/r8clhx2d35c4iy3y299ifx1i8lpaphcx-libossp-uuid-x86_64-w64-mingw32-1.6.2/bin/uuid
  cp: cannot stat '.libs/uuid': No such file or directory

The problem is that the built executable file has a .exe suffix which needs to be accounted for. The following patch fixes this in a cross-platform way:

  diff --git a/Makefile.in b/Makefile.in
  --- a/Makefile.in
  +++ b/Makefile.in
  @@ -56,6 +56,7 @@ CP          = cp
   RMDIR       = rmdir
   SHTOOL      = $(S)/shtool
   LIBTOOL     = $(C)/libtool
  +EXEEXT      = @EXEEXT@
   TRUE        = true
   POD2MAN     = pod2man
   PERL        = @PERL@
  @@ -253,7 +254,7 @@ install:
    -@if [ ".$(WITH_CXX)" = .yes ]; then \
        $(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(CXX_NAME) $(DESTDIR)$(libdir)/; \
    fi
  - @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/
  + @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 $(PRG_NAME)$(EXEEXT) $(DESTDIR)$(bindir)/
    $(SHTOOL) install -c -m 644 $(S)/uuid.1 $(DESTDIR)$(mandir)/man1/
    -@if [ ".$(WITH_PERL)" = .yes ]; then \
        (cd $(S)/perl && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR)); \
[Add remarks]

Remarks:

Properties:

Type: code           Version: 1.6.2 
Status: new          Created: 2023-Oct-13 01:09
Severity:          Last Change: 2023-Oct-13 01:09
Priority:          Subsystem: uuid 
Assigned To: rse           Derived From:  
Creator: anonymous 

CVSTrac 2.0.1