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)); \
Remarks:
Properties:
Type: |
code |
|
Version: |
1.6.2 |
Status: |
new |
|
Created: |
2023-Oct-13 01:09 |
Severity: |
1 |
|
Last Change: |
2023-Oct-13 01:09 |
Priority: |
1 |
|
Subsystem: |
uuid |
Assigned To: |
rse |
|
Derived From: |
|
Creator: |
anonymous |