Index | Thread | Search

From:
"Johannes Thyssen Tishman" <johannes@thyssentishman.com>
Subject:
Re: x11/tk/8.6: Missing headers in package?
To:
"Stuart Cassoff" <exokoide@yahoo.ca>, "Stuart Henderson" <stu@spacehopper.org>
Cc:
"ports@openbsd.org" <ports@openbsd.org>
Date:
Thu, 19 Sep 2024 19:49:29 +0200

Download raw body.

Thread
  • Stuart Cassoff:

    x11/tk/8.6: Missing headers in package?

  • 2024-09-19T14:28:27Z Stuart Cassoff:
    >  Private headers shouldn't be installed; if a package needs them then that package should be fixed.Maybe investigate to see what the software needs in terms of #define, private structs or functions then add some -D's or adjust the software to use public structs/functions.
    >
    > Stu(I have a really old togl port somewhere that I should dust off and finish.)
    
    I'm giving the port a try as well and it seems to also require the
    private headers. The configuration fails with the following error (full
    configuration log attached as well as WIP port):
    
    checking for Tcl private include files... configure: error: Cannot find private header tclInt.h in /usr/obj/ports/tcl-8.6.13/tcl8.6.13
    
    I assume your port used verision 8.5?
    
    >     On Wednesday, September 18, 2024 at 11:08:51 a.m. EDT, Johannes Thyssen Tishman <johannes@thyssentishman.com> wrote:  
    >  
    >  2024-09-18T13:55:03Z Stuart Henderson:
    > > On 2024/09/18 15:29, Johannes Thyssen Tishman wrote:
    > > > 2024-09-18T13:12:02Z Stuart Henderson:
    > > > >
    > > > > fwiw these are the private headers which stu@ intentionally removed
    > > > > in this commit:
    > > > 
    > > > Thanks Stuart. Hmm it's been a while since this was changed. I'm
    > > > surprised these headers were not needed until now. I don't really
    > >
    > > Most things don't need them, only if they're poking about in internals
    > > (which togl seems to be doing).
    > >
    > > > understand the reason for their removal, but I'd be interested to know
    > > > if bringing them back could be considered.
    > >
    > > as an alternative to including in the tk package, it might be possible
    > > to use BUILD_DEPENDS=x11/tk:patch and point netgen's build at the copy
    > > from Tk's source dir (it will be extracted under netgen's WRKDIR).
    >
    > Oh wow, I didn't know about the :patch target. Thank you, this worked!
    >
    > > > > $ cvsps -s 136 -g
    > > > > ---------------------
    > > > > PatchSet 136
    > > > > Date: 2015/05/22 05:17:59
    > > > > Author: stu
    > > > > Branch: HEAD
    > > > > Tag: (none)
    > > > > Log:
    > > > > Update to 8.6.4.
    > > > >
    > > > > Discontinue the installation of private header files.
    > > > > Better setting of Tcl include dir.
    > > > > Improved lib/package/module path config/runtime.
    > > > > Port improvements for less diff churn on future port updates.
    > > > >
    > > > > Members:
    > > > >     8.6/Makefile:1.8->1.9
    > > > >     8.6/distinfo:1.3->1.4
    > > > >     8.6/patches/patch-library_tk_tcl:1.1->1.2
    > > > >     8.6/patches/patch-unix_Makefile_in:1.3->1.4
    > > > >     8.6/pkg/PLIST:1.6->1.7
    > > > >
    > > > > Index: ports/x11/tk/8.6/Makefile
    > > > > diff -u ports/x11/tk/8.6/Makefile:1.8 ports/x11/tk/8.6/Makefile:1.9
    > > > > --- ports/x11/tk/8.6/Makefile:1.8    Sun Sep  7 18:49:32 2014
    > > > > +++ ports/x11/tk/8.6/Makefile    Fri May 22 04:17:59 2015
    > > > > @@ -1,10 +1,11 @@
    > > > > -# $OpenBSD: Makefile,v 1.8 2014/09/07 18:49:32 stu Exp $
    > > > > +# $OpenBSD: Makefile,v 1.9 2015/05/22 04:17:59 stu Exp $
    > > > >
    > > > >  COMMENT =        graphical toolkit for Tcl
    > > > >
    > > > > -DISTNAME =        tk8.6.2
    > > > > -PKGNAME =        tk-8.6.2
    > > > > -SHARED_LIBS =        tk86 1.1
    > > > > +P =            4
    > > > > +DISTNAME =        tk8.6.${P}
    > > > > +PKGNAME =        tk-8.6.${P}
    > > > > +SHARED_LIBS =        tk86 1.2
    > > > >  CATEGORIES =        x11 x11/tk
    > > > >  HOMEPAGE =        http://www.tcl.tk/
    > > > >  MAINTAINER =        Stuart Cassoff <stwo@users.sourceforge.net>
    > > > > @@ -17,11 +18,11 @@
    > > > >  MASTER_SITES =        ${MASTER_SITE_SOURCEFORGE:=tcl/}
    > > > >  DISTFILES =        ${DISTNAME}-src.tar.gz
    > > > >
    > > > > -LIB_DEPENDS =        tcl->=8.6.2,<8.6.3:lang/tcl/8.6
    > > > > +LIB_DEPENDS =        tcl-8.6.${P}:lang/tcl/8.6
    > > > >
    > > > >  MAKE_FLAGS +=        TK_LIBRARY='$$(prefix)/lib/tcl/tk$$(VERSION)' \
    > > > > -            TCL_GENERIC_DIR='$$(GENERIC_DIR)' \
    > > > > -            TCL_PLATFORM_DIR='$$(GENERIC_DIR)'
    > > > > +            TCL_GENERIC_DIR='${LOCALBASE}/include/tcl8.6' \
    > > > > +            TCL_PLATFORM_DIR='$$(TCL_GENERIC_DIR)'
    > > > >
    > > > >  FAKE_FLAGS =        INSTALL_DATA_DIR="${INSTALL_DATA_DIR}" \
    > > > >              INSTALL_LIBRARY="${INSTALL_DATA}" \
    > > > > @@ -43,8 +44,6 @@
    > > > >              --enable-man-symlinks \
    > > > >              --disable-rpath \
    > > > >              --with-tcl="${LOCALBASE}/lib/tcl/tcl8.6" \
    > > > > -            EXTRA_INSTALL="install-private-headers" \
    > > > > -            EXTRA_CC_SWITCHES="-I${LOCALBASE}/include/tcl8.6" \
    > > > >              SHLIB_VERSION="${LIBtk86_VERSION}"
    > > > >
    > > > >  .include <bsd.port.arch.mk>
    > > > > @@ -63,9 +62,6 @@
    > > > >  TESTHOME =        ${WRKDIR}/testhome
    > > > >  # Use TESTFLAGS to control the Tk tests
    > > > >  TESTFLAGS =
    > > > > -
    > > > > -pre-configure:
    > > > > -    @${SUBST_CMD} ${WRKSRC}/installManPage
    > > > >
    > > > >  pre-test:
    > > > >      mkdir -p ${TESTHOME}
    > > > > Index: ports/x11/tk/8.6/distinfo
    > > > > diff -u ports/x11/tk/8.6/distinfo:1.3 ports/x11/tk/8.6/distinfo:1.4
    > > > > --- ports/x11/tk/8.6/distinfo:1.3    Sun Sep  7 18:49:32 2014
    > > > > +++ ports/x11/tk/8.6/distinfo    Fri May 22 04:17:59 2015
    > > > > @@ -1,2 +1,2 @@
    > > > > -SHA256 (tk8.6.2-src.tar.gz) = r7ZjkEPsOJBa/iK2HKVIICF/TU6B4K1J+DnBbSv5hXk=
    > > > > -SIZE (tk8.6.2-src.tar.gz) = 4246617
    > > > > +SHA256 (tk8.6.4-src.tar.gz) = CPmd+F5dycQnF2IWPGqruWLIspfcXEwa+L3QX8LdJsE=
    > > > > +SIZE (tk8.6.4-src.tar.gz) = 4266426
    > > > > Index: ports/x11/tk/8.6/patches/patch-library_tk_tcl
    > > > > diff -u ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.1 ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.2
    > > > > --- ports/x11/tk/8.6/patches/patch-library_tk_tcl:1.1    Sat Feb  2 11:18:09 2013
    > > > > +++ ports/x11/tk/8.6/patches/patch-library_tk_tcl    Fri May 22 04:17:59 2015
    > > > > @@ -1,11 +1,12 @@
    > > > > -$OpenBSD: patch-library_tk_tcl,v 1.1 2013/02/02 11:18:09 stu Exp $
    > > > > ---- library/tk.tcl.orig    Wed Feb 15 20:58:18 2012
    > > > > -+++ library/tk.tcl    Wed Feb 15 21:46:10 2012
    > > > > -@@ -53,13 +53,13 @@ namespace eval ::ttk {
    > > > > +$OpenBSD: patch-library_tk_tcl,v 1.2 2015/05/22 04:17:59 stu Exp $
    > > > > +--- library/tk.tcl.orig    Thu Feb 26 12:13:57 2015
    > > > > ++++ library/tk.tcl    Mon Apr  6 21:52:53 2015
    > > > > +@@ -53,13 +53,14 @@ namespace eval ::ttk {
    > > > >      }
    > > > >  }
    > > > >
    > > > >  -# Add Ttk & Tk's directory to the end of the auto-load search path, if it
    > > > > ++# OpenBSD layout.
    > > > >  +# Add Tk's directory to the end of the auto-load search path, if it
    > > > >  # isn't already on the path:
    > > > >
    > > > > Index: ports/x11/tk/8.6/patches/patch-unix_Makefile_in
    > > > > diff -u ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.3 ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.4
    > > > > --- ports/x11/tk/8.6/patches/patch-unix_Makefile_in:1.3    Sun Sep  7 18:49:32 2014
    > > > > +++ ports/x11/tk/8.6/patches/patch-unix_Makefile_in    Fri May 22 04:17:59 2015
    > > > > @@ -1,15 +1,7 @@
    > > > > -$OpenBSD: patch-unix_Makefile_in,v 1.3 2014/09/07 18:49:32 stu Exp $
    > > > > ---- unix/Makefile.in.orig    Mon Jul 28 11:56:44 2014
    > > > > -+++ unix/Makefile.in    Sun Aug 17 17:01:38 2014
    > > > > -@@ -558,6 +558,7 @@ PUBLIC_HDRS = $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDec
    > > > > - # The private headers we want installed for install-private-headers
    > > > > - PRIVATE_HDRS = $(GENERIC_DIR)/tkInt.h $(GENERIC_DIR)/tkIntDecls.h \
    > > > > -     $(GENERIC_DIR)/tkIntPlatDecls.h $(GENERIC_DIR)/tkPort.h \
    > > > > -+    $(GENERIC_DIR)/default.h $(UNIX_DIR)/tkUnixDefault.h \
    > > > > -     $(TTK_HDRS) $(@TK_WINDOWINGSYSTEM@_PRIVATE_HDRS)
    > > > > -
    > > > > - DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
    > > > > -@@ -593,6 +594,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
    > > > > +$OpenBSD: patch-unix_Makefile_in,v 1.4 2015/05/22 04:17:59 stu Exp $
    > > > > +--- unix/Makefile.in.orig    Wed Mar 11 09:59:53 2015
    > > > > ++++ unix/Makefile.in    Mon Apr  6 19:47:51 2015
    > > > > +@@ -593,6 +593,10 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
    > > > >      rm -f $@
    > > > >      @MAKE_STUB_LIB@
    > > > >
    > > > > @@ -20,7 +12,7 @@
    > > > >  # Build Aqua resource files
    > > > >  ${TK_RSRC_FILE}: $(AQUA_RESOURCES)
    > > > >      rm -f $@
    > > > > -@@ -740,10 +745,10 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
    > > > > +@@ -740,10 +744,10 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
    > > > >          echo "}";\
    > > > >          fi \
    > > > >          ) > "$(PKG_INDEX)"; \
    > > > > @@ -32,7 +24,7 @@
    > > > >      @if test -f "tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \
    > > > >          $(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\
    > > > >          chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\
    > > > > -@@ -761,7 +766,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
    > > > > +@@ -761,7 +765,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) $
    > > > >      @EXTRA_INSTALL_BINARIES@
    > > > >      @echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/"
    > > > >      @$(INSTALL_DATA_DIR) $(LIB_INSTALL_DIR)/pkgconfig
    > > > > @@ -41,7 +33,7 @@
    > > > >
    > > > >  install-libraries: libraries
    > > > >      @for i in "$(SCRIPT_INSTALL_DIR)" "$(SCRIPT_INSTALL_DIR)/images" \
    > > > > -@@ -816,6 +821,7 @@ install-demos:
    > > > > +@@ -816,6 +820,7 @@ install-demos:
    > > > >          if [ -f $$i ] ; then \
    > > > >          sed -e '3 s|exec wish|exec wish$(VERSION)|' \
    > > > >              $$i > "$(DEMO_INSTALL_DIR)"/`basename $$i`; \
    > > > > @@ -49,7 +41,7 @@
    > > > >          fi; \
    > > > >          done;
    > > > >      @for i in $(DEMOPROGS); \
    > > > > -@@ -823,7 +829,7 @@ install-demos:
    > > > > +@@ -823,7 +828,7 @@ install-demos:
    > > > >          if test $$i = "square"; then \
    > > > >          rm -f  "$(DEMO_INSTALL_DIR)/$$i"; \
    > > > >          else \
    > > > > Index: ports/x11/tk/8.6/pkg/PLIST
    > > > > diff -u ports/x11/tk/8.6/pkg/PLIST:1.6 ports/x11/tk/8.6/pkg/PLIST:1.7
    > > > > --- ports/x11/tk/8.6/pkg/PLIST:1.6    Sun Sep  7 18:49:32 2014
    > > > > +++ ports/x11/tk/8.6/pkg/PLIST    Fri May 22 04:17:59 2015
    > > > > @@ -1,23 +1,12 @@
    > > > > -@comment $OpenBSD: PLIST,v 1.6 2014/09/07 18:49:32 stu Exp $
    > > > > +@comment $OpenBSD: PLIST,v 1.7 2015/05/22 04:17:59 stu Exp $
    > > > >  @option no-default-conflict
    > > > >  @conflict tk->=8.6,<8.7
    > > > >  %%SHARED%%
    > > > >  @bin bin/wish8.6
    > > > >  include/tk8.6/
    > > > > -include/tk8.6/default.h
    > > > >  include/tk8.6/tk.h
    > > > >  include/tk8.6/tkDecls.h
    > > > > -include/tk8.6/tkInt.h
    > > > > -include/tk8.6/tkIntDecls.h
    > > > > -include/tk8.6/tkIntPlatDecls.h
    > > > > -include/tk8.6/tkIntXlibDecls.h
    > > > >  include/tk8.6/tkPlatDecls.h
    > > > > -include/tk8.6/tkPort.h
    > > > > -include/tk8.6/tkUnixDefault.h
    > > > > -include/tk8.6/tkUnixInt.h
    > > > > -include/tk8.6/tkUnixPort.h
    > > > > -include/tk8.6/ttkDecls.h
    > > > > -include/tk8.6/ttkTheme.h
    > > > >  lib/libtk86.a
    > > > >  @lib lib/libtk86.so.${LIBtk86_VERSION}
    > > > >  lib/libtkstub86.a
    > > > 
    >
    >   
    
    ===> Building from scratch togl-2.0
    ===>  Checking files for togl-2.0
    `/usr/ports/distfiles/Togl2.0-src.tar.gz' is up to date.
    >> (SHA256) Togl2.0-src.tar.gz: OK
    ===>  Extracting for togl-2.0
    ===>  Patching for togl-2.0
    ===>  Compiler link: clang -> env  CCACHE_DIR=/usr/ports/pobj/.ccache  ccache /usr/bin/clang
    ===>  Compiler link: clang++ -> env  CCACHE_DIR=/usr/ports/pobj/.ccache  ccache /usr/bin/clang++
    ===>  Compiler link: cc -> env  CCACHE_DIR=/usr/ports/pobj/.ccache  ccache /usr/bin/cc
    ===>  Compiler link: c++ -> env  CCACHE_DIR=/usr/ports/pobj/.ccache  ccache /usr/bin/c++
    ===>  Generating configure for togl-2.0
    ===>  Configuring for togl-2.0
    Using /usr/ports/pobj/togl-2.0/config.site (generated)
    configure: loading site script /usr/ports/pobj/togl-2.0/config.site
    checking for correct TEA configuration... ok (TEA 3.6)
    checking for Tcl configuration... found /usr/local/lib/tcl/tcl8.6/tclConfig.sh
    checking for existence of /usr/local/lib/tcl/tcl8.6/tclConfig.sh... loading
    checking for Tk configuration... found /usr/local/lib/tcl/tk8.6/tkConfig.sh
    checking for existence of /usr/local/lib/tcl/tk8.6/tkConfig.sh... loading
    configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr/local
    checking for gcc... cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables... 
    checking for suffix of object files... (cached) o
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether cc accepts -g... (cached) yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for a BSD-compatible install... /usr/ports/pobj/togl-2.0/bin/install -c
    checking whether make sets $(MAKE)... (cached) yes
    checking for ranlib... (cached) ranlib
    checking for grep that handles long lines and -e... (cached) /usr/bin/grep
    checking for egrep... (cached) /usr/bin/egrep
    checking for ANSI C header files... (cached) yes
    checking for sys/types.h... (cached) yes
    checking for sys/stat.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for memory.h... (cached) yes
    checking for strings.h... (cached) yes
    checking for inttypes.h... (cached) yes
    checking for stdint.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking if the compiler understands -pipe... yes
    checking whether byte ordering is bigendian... no
    checking for sin... no
    checking for main in -lieee... no
    checking for main in -linet... no
    checking net/errno.h usability... no
    checking net/errno.h presence... no
    checking for net/errno.h... no
    checking for connect... (cached) yes
    checking for gethostbyname... (cached) yes
    checking dirent.h... yes
    checking for errno.h... (cached) yes
    checking for float.h... (cached) yes
    checking for values.h... (cached) no
    checking for limits.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for sys/wait.h... (cached) yes
    checking for dlfcn.h... (cached) yes
    checking for sys/param.h... (cached) yes
    checking whether to link with stubs library... stubs
    checking for autostereo directory... checking for autostereod... no
    checking for Tcl private include files... configure: error: Cannot find private header tclInt.h in /usr/obj/ports/tcl-8.6.13/tcl8.6.13
    *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3022 'do-configure': @for d in /usr/ports/pobj/togl-2.0/Togl2.0;  do  cp -f /usr/...)
    *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3042 '/usr/ports/pobj/togl-2.0/.configure_done': @cd /usr/ports/mystuff/graphics/...)
    *** Error 2 in /usr/ports/mystuff/graphics/togl (/usr/ports/infrastructure/mk/bsd.port.mk:2704 'configure': @lock=togl-2.0;  export _LOCKS_H...)
    
  • Stuart Cassoff:

    x11/tk/8.6: Missing headers in package?