Opened 11 years ago

Closed 10 years ago

Last modified 10 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 10 years ago by ryandesign (Ryan Carsten Schmidt)

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

comment:2 Changed 10 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 10 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 10 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 10 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 10 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, as shown in this reduced test case I made using the tcl.m4 file from MacPorts base:

Local-Admins-MacBook-Pro:MacPorts-fork ericgallager$ cd /Users/ericgallager/autoconf_bug_reports_dir
Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ mkdir m4
Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ ls -al
total 24
drwxr-xr-x    5 ericgallager  staff   170 Mar  8 12:59 .
drwxr-xr-x+ 161 ericgallager  staff  5474 Mar  8 12:38 ..
-rw-r--r--@   1 ericgallager  staff  6148 Mar  8 12:59 .DS_Store
-rw-r--r--@   1 ericgallager  staff    57 Mar  8 12:48 configure.ac
drwxr-xr-x    3 ericgallager  staff   102 Mar  8 12:59 m4
Local-Admins-MacBook-Pro:autoconf_bug_reports_dir ericgallager$ ls -alR
total 24
drwxr-xr-x    5 ericgallager  staff   170 Mar  8 12:59 .
drwxr-xr-x+ 161 ericgallager  staff  5474 Mar  8 12:38 ..
-rw-r--r--@   1 ericgallager  staff  6148 Mar  8 12:59 .DS_Store
-rw-r--r--@   1 ericgallager  staff    57 Mar  8 12:48 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  5 ericgallager  staff    170 Mar  8 12:59 ..
-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])
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:11: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:11: 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:11: the top level
configure.ac:13: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:13: 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:13: the top level
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:769: SC_CONFIG_CFLAGS is expanded from...
configure.ac:13: the top level
configure.ac:14: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:14: 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:14: 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:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:15: the top level
configure.ac:15: warning: The macro `AC_HAVE_HEADERS' is obsolete.
configure.ac:15: 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:15: the top level
configure.ac:16: warning: The macro `AC_TRY_CPP' is obsolete.
configure.ac:16: 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:16: the top level
configure.ac:19: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:19: 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:19: the top level
configure.ac:21: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:21: 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:21: the top level
configure.ac:22: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:22: 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:22: the top level
configure.ac:22: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:22: 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:22: the top level
autoreconf: configure.ac: not using Libtool
autoreconf: running: /opt/local/bin/autoconf --force --warnings=all
configure.ac:11: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:11: 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:11: the top level
configure.ac:13: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:13: 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:13: the top level
configure.ac:13: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:13: 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:14: 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:1963: SC_MISSING_POSIX_HEADERS is expanded from...
configure.ac:15: the top level
configure.ac:15: warning: The macro `AC_HAVE_HEADERS' is obsolete.
configure.ac:15: 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:15: the top level
configure.ac:16: warning: The macro `AC_TRY_CPP' is obsolete.
configure.ac:16: 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:16: the top level
configure.ac:19: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:19: 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:19: the top level
configure.ac:21: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:21: 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:21: the top level
configure.ac:22: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:22: 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:22: the top level
configure.ac:22: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:22: 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:22: the top level
autoreconf: configure.ac: not using Autoheader
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'

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...

Version 3, edited 10 years ago by cooljeanius (Eric Gallager) (previous) (next) (diff)
Note: See TracTickets for help on using tickets.