From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 102512A5E1A1 for <9fans@9fans.net>; Sun, 21 Jun 2020 15:37:46 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 3D663550DF6; Sun, 21 Jun 2020 15:37:46 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1592768266; b=bj5/FICSUFG1MFDZqLEyFqEBHWgyv32v/zTwma6jhGm0cJ402x jt1Jz2Kg1jNNX36fXX/Nbbq3Zf4YmddIz0ngYQ4PVC9T+dbW4pjD4b/LASHsoT3l y9RzyaLKM3ABGAQjnwq46iJW1sIFoo2weFUZddb1H46d6VBwyYm2QwsrmYQP3VTK HT6RJDZKLubgBuEXdDpwRwygNXXqONOgyaMZdmbCKhDZ6942Ms7PQBUBhru6pYWA ajhi9hRlOFSfrg2l5L/ftwudEokY8SR7UQg27DZXkKrWk4Ox8UrLKnD55of8V/bO 5vBpPGL78J2xCl0kNl4q4stU0WtbMuaX/o3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:date:subject:from:mime-version :content-type:content-transfer-encoding; s=arcseal; t= 1592768266; bh=TfWNeFoQG6D+Q6KXqAiy/0byKyFH2i/ALioUN0vdmRw=; b=O cabubvoDlD05AwSPEoL4A36F2Afkj7Nin88glYI4hUIdHbB+f8w6ld+rR5NHQDpP 4K7maefRHmKcux3/FPwU7lhxoyqoC0uG4cqySTXY0yjeDNndDGbXFqcz5oEysaMX XcpBJyorV3P0Q/wp1HIv5jFkPVdhmL2560EX8xtMVzGSbJLz0bW5xI43RiCPXur8 MKKYyvgiA5xxlN+Sm3iGe9uonNAd6p6qPOyXpFZ3jZLvyqZ/sy29oyZg89ObSR8F jYqAFs5BuwE8CuZGq9ELhPO83gB2AlS2r5aGtjTI52Sbwb1NhnAPTcFl8Mr7XuRu JitbXhIC58AUswa+M5I5A== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (Domain is not BIMI enabled); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,eigenstate.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,eigenstate.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (Domain is not BIMI enabled); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,eigenstate.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,eigenstate.org,kusuri.pikopiko.org,nokogiri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeduhedrudektddgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkffvff fuhfggtgfgsehtjeejtddttddvnecuhfhrohhmpehorhhisegvihhgvghnshhtrghtvgdr ohhrghenucggtffrrghtthgvrhhnpefhffefffevgedvfedugeehkeffudegffdtfeefff eiffetvddvieevudduhfegjeenucffohhmrghinhepjegrfedrnhgvfienucfkphepvddt iedruddvgedrudefvddruddtjedpjeegrddutddurddvrdeinecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehinhgvthepvddtiedruddvgedrudefvddruddtjedphhgv lhhopehmihhmihhrrdgvihhgvghnshhtrghtvgdrohhrghdpmhgrihhlfhhrohhmpeeooh hrihesvghighgvnhhsthgrthgvrdhorhhgqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (eigenstate.org: 206.124.132.107 is authorized to use 'ori@eigenstate.org' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="ori@eigenstate.org"; helo=mimir.eigenstate.org; client-ip=206.124.132.107 Received: from mimir.eigenstate.org (mimir.eigenstate.org [206.124.132.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 21 Jun 2020 15:37:45 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from abbatoir.fios-router.home (pool-74-101-2-6.nycmny.fios.verizon.net [74.101.2.6]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id d15d37e7 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO); Sun, 21 Jun 2020 12:37:44 -0700 (PDT) Message-ID: To: ori@eigenstate.org, conor.williams@gmail.com, 9fans@9fans.net Date: Sun Jun 21 12:34:27 PDT 2020 Subject: Re: [9fans] Tcl 8.7a3 port to Plan 9 From: ori@eigenstate.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: b0f6628c-b3f6-11ea-bcc1-8ff841f99963 > ok... attached are the compiler listings... First off, let's keep this on the list so that anyone can help out, follow progress, or learn. (retrying, typoed the address before) > i have made very few changes to the code so > no diff yet... > ----------------------------- > # file.6 > ----------------------------- > cc -c -O -DBUILD_tcl -I"." -I/usr/glenda/tcl8.6.10/unix > -I/usr/glenda/tcl8.6.10/generic -I/usr/glenda/tcl8.6.10/libtommath > -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6\" > -DPACKAGE_STRING=\"tcl\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 > -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DNO_DLFCN_H=1 > -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=0 -D_REENTRANT=1 -D_THREAD_SAFE=0 > -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_NET_ERRNO_H=1 -DHAVE_ZLIB=1 > -DMODULE_SCOPE=extern -DTCL_SHLIB_EXT=\"\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 > -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=long\ long > -DHAVE_STRUCT_DIRENT64=0 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 > -DHAVE_WAITPID=1 -DNO_GETWD=1 -DNO_REALPATH=1 -DNEED_FAKE_RFC2553=0 > -DHAVE_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1 -DNO_FD_SET=1 -DHAVE_SYS_TIME_H=1 > -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 > -DHAVE_MKTIME=1 -DHAVE_TIMEZONE_VAR=1 -DNO_FSTATFS=1 -Dsocklen_t=int > -Dintptr_t=int -Duintptr_t=unsigned\ int -DNO_UNION_WAIT=1 > -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DNO_ISNAN=1 > -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 -DMP_FIXED_CUTOFFS > -DMP_NO_STDINT /usr/glenda/tcl8.6.10/generic/tclIOSock.c > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:191[stdin:18411] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:191[stdin:18411] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:192[stdin:18412] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:203[stdin:18421] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:205[stdin:18423] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:210[stdin:18428] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:230[stdin:18440] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:230[stdin:18440] name not > declared: AI_PASSIVE > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:233[stdin:18443] structure not > fully declared addrinfo > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:240[stdin:18450] incompatible > types: "IND CONST CHAR" and "INT" for op "AS" > /usr/glenda/tcl8.6.10/generic/tclIOSock.c:255[stdin:18461] structure not > fully declared addrinfo > too many errors First off, TCL seems to do #ifdef FOO_FEATURE # thing #endif That means that -DFOO_FEATURE=0 is the same as -DFOO_FEATURE=1 The exception I see is for threads, where undefined threadss means turning threading on, and -DTCL_THREADS=0 means turn it off. I removed the -DFOO=0 defines, and added -DTCL_THREADS=0. Note, it'd be better to import lufia's pthreads.h code from the pull request on 9legacy, and enable all ape programs to use pthreads. Other than that, I needed to make four changes: -DHAVE_NET_ERRNO_H=1: we don't have this -DNEED_FAKE_RFC2553=0: this breaks us -D_BSD_EXTENSION: we need to turn on some BSD functions. There's a good chance that you'll need -D_POSIX_SOURCE -D_SUSV2_SOURCE for some other code too; I find that pretty much any recent code that does nontrivial things wants these to be defined. -tclUnixPort.h:134 #include we don't have this, but there's no define around it; this works for the file I compiled, but probably breaks elsewhere; you'll probably need to look at what posix mandates is in here, and then implement it. Running on 9front amd64. the command that worked for this file: cc -c -O -D_BSD_EXTENSION -DTCL_THREADS=0 -DBUILD_tcl -I"." -I/tmp/tcl8.7a3/unix -I/tmp/tcl8.7a3/generic -I/tmp/tcl8.7a3/libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tcl\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DNO_DLFCN_H=1 -DHAVE_SYS_PARAM_H=1 -D_REENTRANT=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_ZLIB=1 -DMODULE_SCOPE=extern -DTCL_SHLIB_EXT=\"\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DNO_GETWD=1 -DNO_REALPATH=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1 -DNO_FD_SET=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TIMEZONE_VAR=1 -DNO_FSTATFS=1 -Dsocklen_t=int -Dintptr_t=int -Duintptr_t=unsigned\ int -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DNO_ISNAN=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 -DMP_FIXED_CUTOFFS -DMP_NO_STDINT /tmp/tcl8.7a3/generic/tclIOSock.c With this diff applied: diff -urN tcl8.7a3/unix/tclUnixPort.h tcl8.7a3.new/unix/tclUnixPort.h --- tcl8.7a3/unix/tclUnixPort.h Sun Jun 21 12:32:13 2020 +++ tcl8.7a3.new/unix/tclUnixPort.h Sun Jun 21 12:33:16 2020 @@ -131,7 +131,7 @@ *--------------------------------------------------------------------------- */ -#include +//#include #ifdef HAVE_SYS_SELECT_H # include #endif