Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcl 8.6.4 - compile for source on AIX 6.1

43 views
Skip to first unread message

jo...@norricorp.f9.co.uk

unread,
Jul 15, 2015, 7:47:42 AM7/15/15
to
Hi,
Using 8.3.0, compiled on AIX 6.1 with no problems. It compiles with the xlc compiler.
But when I try to build tcl 8.6.4, I notice some changes. Configure uses xlc_r rather than xlc. But the difference that causes a problem is setting TCL_LIBRARY snd TCL_PACKAGE_PATH.tclUnixInit.c is the only file that uses these extra variables in make and I get the following errors.

xlcwrapper_r -c -DNDEBUG -O -DBUILD_tcl -I"." -I/tmp/xxxxxx/tcl8.6.4/unix -I/tmp/xxxxxx/tcl8.6.4/generic -I/tmp/xxxxxx/tcl8.6.4/libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6.4\" -DPACKAGE_STRING=\"tcl8.6.4\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_ZLIB=1 -DMODULE_SCOPE=extern -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".so\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=__int64 -DHAVE_STRUCT_DIR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AGE_PATH="\"/build/3rdparty/opt/freeware/tcl8.6.4/lib \"" /tmp/xxxxxx/tcl8.6.4/unix/tclUnixInit.c
xlc_r: 1501-228 (W) input file " not found
"/tmp/xxxxxx/tcl8.6.4/unix/tclUnixInit.c", line 109.70: 1506-186 (S) String literal must be ended before the end of line.
"/tmp/xxxxxx/tcl8.6.4/unix/tclUnixInit.c", line 118.1: 1506-277 (S) Syntax error: possible missing ')' or ','?
"/tmp/xxxxxx/tcl8.6.4/unix/tclUnixInit.c", line 121.1: 1506-046 (S) Syntax error.

make: 1254-004 The error code from the last command is 252.
the relevant code in the .c file is (starting at line 101)

static char defaultLibraryDir[sizeof(TCL_LIBRARY)+200] = TCL_LIBRARY;

/*
* Directory in which to look for packages (each package is typically
* installed as a subdirectory of this directory). The symbol is defined by
* Makefile.
*/

static char pkgPath[sizeof(TCL_PACKAGE_PATH)+200] = TCL_PACKAGE_PATH;

/*
* The following table is used to map from Unix locale strings to encoding
* files. If HAVE_LANGINFO is defined, then this is a fallback table when the
* result from nl_langinfo isn't a recognized encoding. Otherwise this is the
* first list checked for a mapping from env encoding to Tcl encoding name.
*/

typedef struct LocaleTable {
const char *lang;
const char *encoding;
} LocaleTable;

I am guessing that it is getting confused with the quotes and escaped quotes. But I have hardcoded the varibale values in the .c file and that did not fix the problem.
So generally confused and hoping someone can help.
Regards




Erik Leunissen

unread,
Jul 15, 2015, 11:53:05 AM7/15/15
to
> Syntax error. ...
> make: 1254-004 The error code from the last command is 252. the
> relevant code in the .c file is (starting at line 101)
>
> static char defaultLibraryDir[sizeof(TCL_LIBRARY)+200] =
> TCL_LIBRARY;
>
> /* * Directory in which to look for packages (each package is
> typically * installed as a subdirectory of this directory). The
> symbol is defined by * Makefile. */
>

I understand from this error that the compiler stumbles across this line
after TCL_PKG_PATH has been substituted:

> static char pkgPath[sizeof(TCL_PACKAGE_PATH)+200] =
> TCL_PACKAGE_PATH;
>
> /* * The following table is used to map from Unix locale strings to
> encoding * files. If HAVE_LANGINFO is defined, then this is a
> fallback table when the * result from nl_langinfo isn't a recognized
> encoding. Otherwise this is the * first list checked for a mapping
> from env encoding to Tcl encoding name. */
>
> typedef struct LocaleTable { const char *lang; const char *encoding;
> } LocaleTable;
>
> I am guessing that it is getting confused with the quotes and escaped
> quotes.

Maybe you get the wiser by inspecting the preprocessed source file. You
could add to the Makefile a make target which dumps that. I'm unfamiliar
with the AIX compiler; gcc lets you do that with the option "-E"
(instead of "-c"). Please consult the manual for your compiler.


Regardless, this:

But I have hardcoded the varibale values in the .c file and
> that did not fix the problem.


is a perplexing result.

Erik.


So generally confused and hoping
> someone can help. Regards
>
>
>
>


--
elns@ nl | Merge the left part of these two lines into one,
xs4all. | respecting a character's position in a line.

Erik Leunissen

unread,
Jul 15, 2015, 11:59:47 AM7/15/15
to
On 15/07/15 13:47, jo...@norricorp.f9.co.uk wrote:

> ...
> -DTCL_LIBRARY="\"/build/3rdparty/opt/freeware/tcl8.6.4/lib/tcl8.6\""
> -DTCL_PACKAGE_PATH="\"/build/3rdparty/opt/freeware/tcl8.6.4/lib \""
^
|
Could the extra space be of influence?

Erik.

jo...@norricorp.f9.co.uk

unread,
Jul 15, 2015, 12:35:53 PM7/15/15
to
So the answer turned out to be editing the generated Makefile to remove a trailing space from TCL_PACKAGE_PATH.
I also had to go through each generated Makefile under packages to remove the backslash space in PACKAGE_STRING variable.

Harald Oehlmann

unread,
Jul 15, 2015, 1:24:31 PM7/15/15
to
Am Mittwoch, 15. Juli 2015 18:35:53 UTC+2 schrieb jo...@norricorp.f9.co.uk:
> So the answer turned out to be editing the generated Makefile to remove a trailing space from TCL_PACKAGE_PATH.
> I also had to go through each generated Makefile under packages to remove the backslash space in PACKAGE_STRING variable.

I would appreciate that you file a bug if this is a TCL issue.
-Harald
0 new messages