NetBSD Problem Report #56702

From www@netbsd.org  Thu Feb 10 19:54:24 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DFDB91A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Feb 2022 19:54:23 +0000 (UTC)
Message-Id: <20220210195422.C65671A923A@mollari.NetBSD.org>
Date: Thu, 10 Feb 2022 19:54:22 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: math/liblinear fails to compile under Solaris 10
X-Send-Pr-Version: www-1.0

>Number:         56702
>Category:       pkg
>Synopsis:       math/liblinear fails to compile under Solaris 10
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 10 19:55:00 +0000 2022
>Last-Modified:  Thu Feb 10 21:07:19 +0000 2022
>Originator:     Claes Nästén
>Release:        trunk 2022-02-10
>Organization:
>Environment:
SunOS 5.10 sun4v sparc SUNW,SPARC-Enterprise-T2000
>Description:
math/liblinear fails to compile for me under Solaris 10, using GCC 8.4 and mksh.

libtool fails to figure out how to compile and the patch for liblinear making it use libtool does not specify --tag.

Works just fine with updated patches with provided --tag.
>How-To-Repeat:
Build math/liblinear on Solaris 10
>Fix:
diff --git a/math/liblinear/patches/patch-Makefile b/math/liblinear/patches/patch-Makefile
index 0e6e938e410..bcb289958ed 100644
--- a/math/liblinear/patches/patch-Makefile
+++ b/math/liblinear/patches/patch-Makefile
@@ -25,26 +25,26 @@ Add support for LDFLAGS.
 -      fi; \
 -      $(CXX) $${SHARED_LIB_FLAG} linear.o newton.o blas/blas.a -o liblinear.so.$(SHVER)
 +lib: linear.lo newton.lo $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) -o liblinear.la $(LDFLAGS) $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0
++      ${LIBTOOL} --mode=link --tag=CXX $(CXX) -o liblinear.la $(LDFLAGS) $> -rpath ${PREFIX}/lib -version-info ${SHVER}:0

 -train: newton.o linear.o train.c blas/blas.a
 -      $(CXX) $(CFLAGS) -o train train.c newton.o linear.o $(LIBS)
 +train: newton.lo linear.lo train.c $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o train $(LDFLAGS) $>
++      ${LIBTOOL} --mode=link --tag=CXX $(CXX) $(CFLAGS) -o train $(LDFLAGS) $>

 -predict: newton.o linear.o predict.c blas/blas.a
 -      $(CXX) $(CFLAGS) -o predict predict.c newton.o linear.o $(LIBS)
 +predict: newton.lo linear.lo predict.c $(LIBS)
-+      ${LIBTOOL} --mode=link $(CXX) $(CFLAGS) -o predict $(LDFLAGS) $>
++      ${LIBTOOL} --mode=link --tag=CXX $(CXX) $(CFLAGS) -o predict $(LDFLAGS) $>

 -newton.o: newton.cpp newton.h
 +newton.lo: newton.cpp newton.h
-+      ${LIBTOOL} --mode=compile \
++      ${LIBTOOL} --mode=compile --tag=CXX \
        $(CXX) $(CFLAGS) -c -o newton.o newton.cpp

 -linear.o: linear.cpp linear.h
 +linear.lo: linear.cpp linear.h
-+      ${LIBTOOL} --mode=compile \
++      ${LIBTOOL} --mode=compile --tag=CXX \
        $(CXX) $(CFLAGS) -c -o linear.o linear.cpp

 -blas/blas.a: blas/*.c blas/*.h
diff --git a/math/liblinear/patches/patch-blas_Makefile b/math/liblinear/patches/patch-blas_Makefile
index 83d6048a0d3..2d6f03c5f47 100644
--- a/math/liblinear/patches/patch-blas_Makefile
+++ b/math/liblinear/patches/patch-blas_Makefile
@@ -13,7 +13,7 @@ Add support for LDFLAGS.
 -      $(AR) blas.a $(FILES)
 -      $(RANLIB) blas.a
 +blas: $(FILES:.o=.lo) $(HEADERS)
-+      $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libblas.la $(LDFLAGS) $(FILES:.o=.lo)
++      $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o libblas.la $(LDFLAGS) $(FILES:.o=.lo)

  clean:
        - rm -f *.o
@@ -24,6 +24,6 @@ Add support for LDFLAGS.
 -      $(CC) $(CFLAGS) -c $*.c
 +.SUFFIXES: .lo
 +.c.lo:
-+      $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
++      $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -c $<



>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Thu, 10 Feb 2022 21:07:19 +0000
Responsible-Changed-Why:
A SunOS problem.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.