Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#39752 closed defect (invalid)

tcl @8.6.0's tclConfig.sh script contains MacPorts build directories

Reported by: cooljeanius (Eric Gallager) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: tcl

Description

specifically:

# String to pass to linker to pick up the Tcl library from its
# build directory.
TCL_BUILD_LIB_SPEC='-L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.0/unix -ltcl8.6'
# Location of the top-level source directory from which Tcl was built.
# This is the directory that contains a README file as well as
# subdirectories such as generic, unix, etc.  If Tcl was compiled in a
# different place than the directory containing the source files, this
# points to the location of the sources, not the location where Tcl was
# compiled.
TCL_SRC_DIR='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.0'
# String to pass to linker to pick up the Tcl stub library from its
# build directory.
TCL_BUILD_STUB_LIB_SPEC='-L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.0/unix -ltclstub8.6'
# Path to the Tcl stub library in the build directory.
TCL_BUILD_STUB_LIB_PATH='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.0/unix/libtclstub8.6.a'

This makes it difficult to manually compile Tcl extensions against MacPorts's Tcl.

Change History (6)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mww@… removed
Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: invalid
Status: newclosed

This is actually expected. $TCL_BUILD_STUB_LIB_SPEC is for the cases when you're building your own Tcl in-tree and want to link against that from its build (as opposed to install) location.

If you use the macros from tcl.m4 in your autoconf-based build system it will automatically choose the right set of variables for you.

comment:3 Changed 11 years ago by neverpanic (Clemens Lang)

Also see /usr/lib/tclConfig.sh:

TCL_BUILD_LIB_SPEC='-F/private/var/tmp/tcl/tcl-102~350/OBJROOT2/tcl/Deployment -framework Tcl'

comment:4 in reply to:  2 ; Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to cal@…:

This is actually expected. $TCL_BUILD_STUB_LIB_SPEC is for the cases when you're building your own Tcl in-tree and want to link against that from its build (as opposed to install) location.

I think that actually might have been what I was trying to do (I have a copy of Tcl in-tree for my fork of apple-gdb, for use with gdbtk), and I think that I must have just forgot to tell it to use the in-tree one instead of the MacPorts one... although then again, if this is from 8 months ago, I do not think that I had actually started work on that by that point, so maybe it was for something different, I forget...

If you use the macros from tcl.m4 in your autoconf-based build system it will automatically choose the right set of variables for you.

The macros in the standard tcl.m4 are also pretty out-of-date, so I usually modify the copy I use to bring it more up-to-date, and it is possible that one of these modifications might have accidentally messed up the variables that it chose... anyway, either way it was probably a user error on my part, so I am okay with the closing of this.

comment:5 in reply to:  4 ; Changed 11 years ago by neverpanic (Clemens Lang)

Replying to egall@…:

I think that actually might have been what I was trying to do (I have a copy of Tcl in-tree for my fork of apple-gdb, for use with gdbtk), and I think that I must have just forgot to tell it to use the in-tree one instead of the MacPorts one... although then again, if this is from 8 months ago, I do not think that I had actually started work on that by that point, so maybe it was for something different, I forget...

Make sure that right next to the tclConfig.sh file picked up by your configure script there also is a Makefile. That's the test tcl.m4 uses to determine whether to use the build variables.

The macros in the standard tcl.m4 are also pretty out-of-date, so I usually modify the copy I use to bring it more up-to-date, and it is possible that one of these modifications might have accidentally messed up the variables that it chose... anyway, either way it was probably a user error on my part, so I am okay with the closing of this.

In what way are the macros in tcl.m4 out of date?

comment:6 in reply to:  5 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to cal@…:

Replying to egall@…:

The macros in the standard tcl.m4 are also pretty out-of-date, so I usually modify the copy I use to bring it more up-to-date, and it is possible that one of these modifications might have accidentally messed up the variables that it chose... anyway, either way it was probably a user error on my part, so I am okay with the closing of this.

In what way are the macros in tcl.m4 out of date?

Try running autoreconf with the -Wall flag in a project that contains the standard tcl.m4 file in it, and uses all the macros from it. It will print a bunch of warnings about obsolete macros (which can even turn into errors when using autoheader), as shown in this reduced test case I made using the tcl.m4 file from MacPorts base:

Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ ls -alR
total 464
drwxr-xr-x    7 ericgallager  staff     238 Mar  8 15:09 .
drwxr-xr-x+ 161 ericgallager  staff    5474 Mar  8 12:38 ..
-rw-r--r--@   1 ericgallager  staff    6148 Mar  8 15:09 .DS_Store
-rw-r--r--    1 ericgallager  staff     690 Mar  8 13:03 aclocal.m4
-rwxr-xr-x    1 ericgallager  staff  219064 Mar  8 13:03 configure
-rw-r--r--@   1 ericgallager  staff     463 Mar  8 15:09 configure.ac
drwxr-xr-x    3 ericgallager  staff     102 Mar  8 12:59 m4

./m4:
total 160
drwxr-xr-x  3 ericgallager  staff    102 Mar  8 12:59 .
drwxr-xr-x  7 ericgallager  staff    238 Mar  8 15:09 ..
-rw-r--r--@ 1 ericgallager  staff  77897 Jan 10  2013 tcl.m4
Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ cat configure.ac
AC_INIT([testcase])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])

SC_PATH_TCLCONFIG
SC_PATH_TKCONFIG
SC_LOAD_TCLCONFIG
SC_LOAD_TKCONFIG
SC_ENABLE_SHARED
SC_ENABLE_FRAMEWORK
SC_ENABLE_THREADS
SC_ENABLE_SYMBOLS
SC_ENABLE_LANGINFO
SC_CONFIG_MANPAGES
SC_CONFIG_CFLAGS
SC_SERIAL_PORT
SC_MISSING_POSIX_HEADERS
SC_PATH_X
SC_BLOCKING_STYLE
SC_TIME_HANLDER
SC_BUGGY_STRTOD
SC_TCL_LINK_LIBS
SC_TCL_EARLY_FLAGS
SC_TCL_64BIT_FLAGS
SC_PUBLIC_TCL_HEADERS

AC_OUTPUT
Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ autoreconf -fvi -Wall
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force --warnings=all 
m4/tcl.m4:67: warning: underquoted definition of SC_PATH_TCLCONFIG
m4/tcl.m4:67:   run info Automake 'Extending aclocal'
m4/tcl.m4:67:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
autoreconf: configure.ac: tracing
configure.ac:13: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:13: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:605: SC_ENABLE_LANGINFO is expanded from...
configure.ac:13: the top level
configure.ac:15: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:15: You should run autoupdate.
../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from...
m4/tcl.m4:769: SC_CONFIG_CFLAGS is expanded from...
configure.ac:15: the top level
configure.ac:15: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:15: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:769: SC_CONFIG_CFLAGS is expanded from...
configure.ac:15: the top level
configure.ac:16: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:16: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:1834: SC_SERIAL_PORT is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:17: You should run autoupdate.
../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from...
m4/tcl.m4:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:17: the top level
configure.ac:17: warning: The macro `AC_HAVE_HEADERS' is obsolete.
configure.ac:17: You should run autoupdate.
../../lib/autoconf/oldnames.m4:35: AC_HAVE_HEADERS is expanded from...
m4/tcl.m4:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:17: the top level
configure.ac:18: warning: The macro `AC_TRY_CPP' is obsolete.
configure.ac:18: You should run autoupdate.
../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from...
m4/tcl.m4:2043: SC_PATH_X is expanded from...
configure.ac:18: the top level
configure.ac:21: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:21: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:2270: SC_BUGGY_STRTOD is expanded from...
configure.ac:21: the top level
configure.ac:23: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:23: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:2408: SC_TCL_EARLY_FLAG is expanded from...
m4/tcl.m4:2420: SC_TCL_EARLY_FLAGS is expanded from...
configure.ac:23: the top level
configure.ac:24: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:24: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:2452: SC_TCL_64BIT_FLAGS is expanded from...
configure.ac:24: the top level
configure.ac:24: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:24: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:2452: SC_TCL_64BIT_FLAGS is expanded from...
configure.ac:24: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: /opt/local/bin/autoconf --force --warnings=all
configure.ac:13: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:13: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:605: SC_ENABLE_LANGINFO is expanded from...
configure.ac:13: the top level
configure.ac:15: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:15: You should run autoupdate.
../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from...
m4/tcl.m4:769: SC_CONFIG_CFLAGS is expanded from...
configure.ac:15: the top level
configure.ac:15: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:15: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:769: SC_CONFIG_CFLAGS is expanded from...
configure.ac:15: the top level
configure.ac:16: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:16: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:1834: SC_SERIAL_PORT is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:17: You should run autoupdate.
../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from...
m4/tcl.m4:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:17: the top level
configure.ac:17: warning: The macro `AC_HAVE_HEADERS' is obsolete.
configure.ac:17: You should run autoupdate.
../../lib/autoconf/oldnames.m4:35: AC_HAVE_HEADERS is expanded from...
m4/tcl.m4:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:17: the top level
configure.ac:18: warning: The macro `AC_TRY_CPP' is obsolete.
configure.ac:18: You should run autoupdate.
../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from...
m4/tcl.m4:2043: SC_PATH_X is expanded from...
configure.ac:18: the top level
configure.ac:21: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:21: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:2270: SC_BUGGY_STRTOD is expanded from...
configure.ac:21: the top level
configure.ac:23: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:23: You should run autoupdate.
../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
m4/tcl.m4:2408: SC_TCL_EARLY_FLAG is expanded from...
m4/tcl.m4:2420: SC_TCL_EARLY_FLAGS is expanded from...
configure.ac:23: the top level
configure.ac:24: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:24: the top level
configure.ac:24: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:24: You should run autoupdate.
../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
m4/tcl.m4:2452: SC_TCL_64BIT_FLAGS is expanded from...
configure.ac:24: the top level
autoreconf: running: /opt/local/bin/autoheader --force --warnings=all
autoheader: warning: missing template: HAVE_LANGINFO
autoheader: Use AC_DEFINE([HAVE_LANGINFO], [], [Description])
autoheader: warning: missing template: HAVE_NET_ERRNO_H
autoheader: warning: missing template: HAVE_STRUCT_DIRENT64
autoheader: warning: missing template: HAVE_STRUCT_STAT64
autoheader: warning: missing template: HAVE_TYPE_OFF64_T
autoheader: warning: missing template: NO_DIRENT_H
autoheader: warning: missing template: NO_DLFCN_H
autoheader: warning: missing template: NO_ERRNO_H
autoheader: warning: missing template: NO_FLOAT_H
autoheader: warning: missing template: NO_LIMITS_H
autoheader: warning: missing template: NO_STDLIB_H
autoheader: warning: missing template: NO_STRING_H
autoheader: warning: missing template: NO_SYS_WAIT_H
autoheader: warning: missing template: NO_VALUES_H
autoheader: warning: missing template: PEEK_XCLOSEIM
autoheader: warning: missing template: TCL_COMPILE_DEBUG
autoheader: warning: missing template: TCL_COMPILE_STATS
autoheader: warning: missing template: TCL_MEM_DEBUG
autoheader: warning: missing template: TCL_THREADS
autoheader: warning: missing template: TCL_WIDE_INT_IS_LONG
autoheader: warning: missing template: TCL_WIDE_INT_TYPE
autoheader: warning: missing template: USE_A_OUT_H
autoheader: warning: missing template: USE_DELTA_FOR_TZ
autoheader: warning: missing template: USE_FIONBIO
autoheader: warning: missing template: USE_SGTTY
autoheader: warning: missing template: USE_SYS_EXEC_AOUT_H
autoheader: warning: missing template: USE_SYS_EXEC_H
autoheader: warning: missing template: USE_TERMIO
autoheader: warning: missing template: USE_TERMIOS
autoheader: warning: missing template: USE_THREAD_ALLOC
autoheader: warning: missing template: _ISOC99_SOURCE
autoheader: warning: missing template: _LARGEFILE64_SOURCE
autoheader: warning: missing template: _OE_SOCKETS
autoheader: warning: missing template: _POSIX_PTHREAD_SEMANTICS
autoheader: warning: missing template: _REENTRANT
autoheader: warning: missing template: _THREAD_SAFE
autoheader: warning: missing template: _XOPEN_SOURCE
autoheader: warning: missing template: _XOPEN_SOURCE_EXTENDED
autoheader: warning: missing template: strtod
autoreconf: /opt/local/bin/autoheader failed with exit status: 1

You can run autoupdate on it, but doing that leaves behind some artifacts that have to be fixed manually. I will attach some diffs to illustrate in a bit.

Edit: nvm, it turns out that I was actually wrong about being able to run autoupdate on it, doing that fails with this error:

Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ autoupdate m4/tcl.m4
/opt/local/bin/gm4:/var/folders/Vs/VsGkDxJXHq41Y+34HmvuNk+++Tg/-Tmp-//aulmpnYY/input.m4:2527: ERROR: end of file in string
autoupdate: /opt/local/bin/gm4 failed with exit status: 1

I guess I will just attach a diff with my copy that I had already modified by hand (the one from my fork of MacPorts that is), instead of trying to re-run through the autoupdate process from scratch...

Last edited 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)
Note: See TracTickets for help on using tickets.