* Compiling zsh-4.0.2 on Mac OS X @ 2001-07-24 23:58 Wes Morgan 2001-07-25 5:31 ` Borsenkow Andrej 2001-08-31 17:12 ` Brian Boonstra 0 siblings, 2 replies; 8+ messages in thread From: Wes Morgan @ 2001-07-24 23:58 UTC (permalink / raw) To: zsh-workers I'm trying to compile zsh-4.0.2 on Mac OS X (10.0.4). I guess the linker is pretty weird (it's from Apple, not GNU). Here's where make fails: cc -s -o zsh main.o `cat stamp-modobjs` -lm -lc /usr/bin/ld: can't use -s with input files containg indirect symbols (output file must contain at least global symbols, for maximum stripping use -x) make[1]: *** [zsh] Error 1 make: *** [all] Error 1 Has anyone gotten zsh-4 to link on Darwin/Mac OS X? If not, any ideas what I could try to get this to work? Wes Morgan ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Compiling zsh-4.0.2 on Mac OS X 2001-07-24 23:58 Compiling zsh-4.0.2 on Mac OS X Wes Morgan @ 2001-07-25 5:31 ` Borsenkow Andrej 2001-07-30 15:27 ` Clint Adams 2001-08-31 17:12 ` Brian Boonstra 1 sibling, 1 reply; 8+ messages in thread From: Borsenkow Andrej @ 2001-07-25 5:31 UTC (permalink / raw) To: Wes Morgan, zsh-workers > > I'm trying to compile zsh-4.0.2 on Mac OS X (10.0.4). I guess the linker > is pretty weird (it's from Apple, not GNU). Here's where make fails: > > cc -s -o zsh main.o `cat stamp-modobjs` -lm -lc > /usr/bin/ld: can't use -s with input files containg indirect symbols > (output file must contain at least global symbols, for maximum stripping > use -x) > make[1]: *** [zsh] Error 1 > make: *** [all] Error 1 > > Has anyone gotten zsh-4 to link on Darwin/Mac OS X? If not, any ideas > what I could try to get this to work? > The first try is to configure with --enable-zsh-debug. This is the simplest method to turn off -s (strip) flag. Of course, if you can figure out what these "indirect symbols" are (some linkers provide verbose flags) it would be really helpful. -andrej ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Compiling zsh-4.0.2 on Mac OS X 2001-07-25 5:31 ` Borsenkow Andrej @ 2001-07-30 15:27 ` Clint Adams 0 siblings, 0 replies; 8+ messages in thread From: Clint Adams @ 2001-07-30 15:27 UTC (permalink / raw) To: Borsenkow Andrej; +Cc: Wes Morgan, zsh-workers > The first try is to configure with --enable-zsh-debug. This is the simplest > method to turn off -s (strip) flag. Oddly enough, the documentation seems to claim that -s is the same as -S (don't assemble). I guess it's wrong. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Compiling zsh-4.0.2 on Mac OS X 2001-07-24 23:58 Compiling zsh-4.0.2 on Mac OS X Wes Morgan 2001-07-25 5:31 ` Borsenkow Andrej @ 2001-08-31 17:12 ` Brian Boonstra 2001-08-31 17:56 ` Oliver Kiddle 1 sibling, 1 reply; 8+ messages in thread From: Brian Boonstra @ 2001-08-31 17:12 UTC (permalink / raw) To: Wes Morgan; +Cc: zsh-workers You wrote: > I'm trying to compile zsh-4.0.2 on Mac OS X (10.0.4). I guess the linker > is pretty weird (it's from Apple, not GNU). Here's where make fails: > > cc -s -o zsh main.o `cat stamp-modobjs` -lm -lc > /usr/bin/ld: can't use -s with input files containg indirect symbols > (output file must contain at least global symbols, for maximum stripping > use -x) > make[1]: *** [zsh] Error 1 > make: *** [all] Error 1 > > Has anyone gotten zsh-4 to link on Darwin/Mac OS X? If not, any ideas > what I could try to get this to work? Hi Wes I solved this by running autoconf in the top-level source directory. That gave me a configure script with more options, including one for the ldflags, which I then set to be nothing. I suppose this is ultimately a problem with autoconf. Brian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Compiling zsh-4.0.2 on Mac OS X 2001-08-31 17:12 ` Brian Boonstra @ 2001-08-31 17:56 ` Oliver Kiddle 2001-09-23 21:43 ` Wes Morgan 0 siblings, 1 reply; 8+ messages in thread From: Oliver Kiddle @ 2001-08-31 17:56 UTC (permalink / raw) To: Brian Boonstra; +Cc: Wes Morgan, zsh-workers Brian Boonstra wrote: > > I solved this by running > autoconf > in the top-level source directory. That gave me a configure script with > more options, including one for the ldflags, which I then set to be nothing. I take it there no problems with the clear ldflags then? > I suppose this is ultimately a problem with autoconf. What version of autoconf do you have? I'd be suprised if 2.5x doesn't handle MacOS X. Judging by one section of zshconfig.ac, it is probably a zsh problem. Can you try with this patch. You will need to rerun autoconf (or Util/preconfig) or manually apply this to configure itself. Does anyone know if ${enable_zsh_debug} is definitely empty for a no value as I've assumed here? The -x option may not be right in which case we could use nothing. Oliver Index: zshconfig.ac =================================================================== RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v retrieving revision 1.17 diff -u -r1.17 zshconfig.ac --- zshconfig.ac 2001/07/03 17:34:33 1.17 +++ zshconfig.ac 2001/08/31 17:47:17 @@ -307,6 +307,7 @@ if test -n "$auto_ldflags"; then case "${enable_zsh_debug}$host_os" in yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid on these systems + darwin*) LDFLAGS=-x ;; yes*) LDFLAGS=-g ;; *) LDFLAGS=-s ;; esac _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Compiling zsh-4.0.2 on Mac OS X 2001-08-31 17:56 ` Oliver Kiddle @ 2001-09-23 21:43 ` Wes Morgan 2001-09-24 5:51 ` Borsenkow Andrej 2001-09-27 14:19 ` Oliver Kiddle 0 siblings, 2 replies; 8+ messages in thread From: Wes Morgan @ 2001-09-23 21:43 UTC (permalink / raw) To: zsh-workers This patch causes the "checking for executable suffix..." test in the configure script to fail with "compiler cannot create executables." The man page for ld on Mac OS X says that -x overlaps with a compiler option and that to invoke it from cc, it needs to be specified as "-Wl,-x". I changed this in the configure script and configure worked again. Then "make" succeeded, but "make check" had some problems. I don't know if they are specific to OS X or something I did/didn't do. Here's the errors: Test ./C02cond.ztst failed: bad status 1, expected 0 from: [[ -k modish && ! -k zerolength ]] Was testing: -k cond Test ./Y01completion.ztst failed: non-zero status from preparation code: comptestinit -z $ZTST_testdir/../Src/zsh Test ./Y01completion.ztst failed: bad status 1, expected 0 from: comptest $': \t\t\t\t\t\t\t' Error output: comptest:2: command not found: zpty comptest:3: command not found: zpty Was testing: directories and files Test ./Y02compmatch.ztst failed: non-zero status from preparation code: comptestinit -z $ZTST_testdir/../Src/zsh Test ./Y02compmatch.ztst failed: bad status 1, expected 0 from: test_code z: list1 comptest $'tst \t' Error output: comptesteval:4: command not found: zpty comptesteval:5: command not found: zpty comptest:2: command not found: zpty comptest:3: command not found: zpty Was testing: Match Error for "z:" Test ./Y03arguments.ztst failed: bad status 1, expected 0 from: tst_arguments ':desc1:(arg1)' comptest $'tst \t\C-wa\t\C-war\t\C-warg\t\C-warg1\t\C-wr\t\C-wx\t \ty \t' Error output: comptesteval:4: command not found: zpty comptesteval:5: command not found: zpty comptest:2: command not found: zpty comptest:3: command not found: zpty Was testing: one non-option argument Thanks, Wes Morgan Oliver Kiddle wrote: >Brian Boonstra wrote: > >> I solved this by running >> autoconf >>in the top-level source directory. That gave me a configure script with >>more options, including one for the ldflags, which I then set to be nothing. >> > >I take it there no problems with the clear ldflags then? > >> I suppose this is ultimately a problem with autoconf. >> > >What version of autoconf do you have? I'd be suprised if 2.5x doesn't >handle MacOS X. > >Judging by one section of zshconfig.ac, it is probably a zsh problem. >Can you try with this patch. You will need to rerun autoconf (or >Util/preconfig) or manually apply this to configure itself. > >Does anyone know if ${enable_zsh_debug} is definitely empty for a no >value as I've assumed here? The -x option may not be right in which case >we could use nothing. > >Oliver > >Index: zshconfig.ac >=================================================================== >RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v >retrieving revision 1.17 >diff -u -r1.17 zshconfig.ac >--- zshconfig.ac 2001/07/03 17:34:33 1.17 >+++ zshconfig.ac 2001/08/31 17:47:17 >@@ -307,6 +307,7 @@ > if test -n "$auto_ldflags"; then > case "${enable_zsh_debug}$host_os" in > yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid >on these systems >+ darwin*) LDFLAGS=-x ;; > yes*) LDFLAGS=-g ;; > *) LDFLAGS=-s ;; > esac > >_____________________________________________________________________ >This message has been checked for all known viruses by the >MessageLabs Virus Scanning Service. For further information visit >http://www.messagelabs.com/stats.asp > ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Compiling zsh-4.0.2 on Mac OS X 2001-09-23 21:43 ` Wes Morgan @ 2001-09-24 5:51 ` Borsenkow Andrej 2001-09-27 14:19 ` Oliver Kiddle 1 sibling, 0 replies; 8+ messages in thread From: Borsenkow Andrej @ 2001-09-24 5:51 UTC (permalink / raw) To: 'Wes Morgan', 'zsh-workers' > > This patch causes the "checking for executable suffix..." test in the > configure script to fail with "compiler cannot create executables." The > man page for ld on Mac OS X says that -x overlaps with a compiler option > and that to invoke it from cc, it needs to be specified as "-Wl,-x". I > changed this in the configure script and configure worked again. Then > "make" succeeded, but "make check" had some problems. I don't know if > they are specific to OS X or something I did/didn't do. Here's the errors: > > Test ./C02cond.ztst failed: bad status 1, expected 0 from: > [[ -k modish && ! -k zerolength ]] > Was testing: -k cond > That is probably OS specific. Does Mac OS X support sticky bit? > comptest:2: command not found: zpty You compiled without module support (or configure decided that modules are not supported) and did not include zpty in the list of builtin modules. Could you send config.log from clean reconfiguration? -andrej ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Compiling zsh-4.0.2 on Mac OS X 2001-09-23 21:43 ` Wes Morgan 2001-09-24 5:51 ` Borsenkow Andrej @ 2001-09-27 14:19 ` Oliver Kiddle 1 sibling, 0 replies; 8+ messages in thread From: Oliver Kiddle @ 2001-09-27 14:19 UTC (permalink / raw) To: Wes Morgan; +Cc: zsh-workers Sourceforge have just added a couple of MacOS X machines to the compile farm so it is now easier to work out what is happening here. Wes Morgan wrote: > > This patch causes the "checking for executable suffix..." test in the > configure script to fail with "compiler cannot create executables." The > man page for ld on Mac OS X says that -x overlaps with a compiler option > and that to invoke it from cc, it needs to be specified as "-Wl,-x". I > changed this in the configure script and configure worked again. Then Yes, that seems to work so I'll commit that change (both branches). > "make" succeeded, but "make check" had some problems. I don't know if > they are specific to OS X or something I did/didn't do. Here's the errors: > > Test ./C02cond.ztst failed: bad status 1, expected 0 from: > [[ -k modish && ! -k zerolength ]] > Was testing: -k cond This appears to be a bug in chmod as far as I can tell. chmod +t simply doesn't work even though the man page says it should and the numeric equivalent does. Changing the three chmods to one numeric one allows it to set the sticky bit and the test to then work. If this change causes problems on other platforms, we can use a $OSTYPE check. Anyone know where I should report Darwin bugs to? As Andrej pointed out the remaining failures were due to the lack of modules such as zpty. Dynamic module loading doesn't work on MacOS X because it uses Mach-O instead of ELF binaries which the dl* functions are based around. Darwin uses some different NeXT based system instead apparently. Perhaps the tests should better handle missing modules by printing a succinct message and skipping the affected tests. Anyway, I rebuilt a static zsh with the necessary extra modules. All tests up until Y03 then passed successfully. Y03 hangs indefintely. >From the verbose output, it is hanging on the `a and b' test. I'm not very familiar with these completion tests so I've not looked into this in detail. The patch below also adds a mention of Darwin in Etc/MACHINES: it should build `out-of-the-box' now though I expect there to be other problems. Oliver Index: zshconfig.ac =================================================================== RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v retrieving revision 1.18 diff -u -r1.18 zshconfig.ac --- zshconfig.ac 2001/09/13 18:47:02 1.18 +++ zshconfig.ac 2001/09/27 14:13:14 @@ -307,6 +307,7 @@ if test -n "$auto_ldflags"; then case "${enable_zsh_debug}$host_os" in yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid on these systems + darwin*) LDFLAGS=-Wl,-x ;; yes*) LDFLAGS=-g ;; *) LDFLAGS=-s ;; esac Index: Etc/MACHINES =================================================================== RCS file: /cvsroot/zsh/zsh/Etc/MACHINES,v retrieving revision 1.13 diff -u -r1.13 MACHINES --- Etc/MACHINES 2001/06/29 14:59:43 1.13 +++ Etc/MACHINES 2001/09/27 14:13:14 @@ -17,6 +17,9 @@ Machines -------- +Apple: MacOS X/Darwin 1.4 + Should build `out-of-the-box'. Dynamic loading does not work. + Red Hat Inc.: Cygwin Should build `out-of-the-box'. The compilation directory should be on a file system mounted as binary (the mount command shows Index: Test/C02cond.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v retrieving revision 1.9 diff -u -r1.9 C02cond.ztst --- Test/C02cond.ztst 2001/08/22 15:59:27 1.9 +++ Test/C02cond.ztst 2001/09/27 14:13:14 @@ -18,9 +18,7 @@ mkdir modish chgrp $EGID modish - chmod g+xs modish - chmod u+s modish - chmod +t modish + chmod 7710 modish # g+xs,u+s,+t touch unmodish chmod 000 unmodish _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-09-27 14:20 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-07-24 23:58 Compiling zsh-4.0.2 on Mac OS X Wes Morgan 2001-07-25 5:31 ` Borsenkow Andrej 2001-07-30 15:27 ` Clint Adams 2001-08-31 17:12 ` Brian Boonstra 2001-08-31 17:56 ` Oliver Kiddle 2001-09-23 21:43 ` Wes Morgan 2001-09-24 5:51 ` Borsenkow Andrej 2001-09-27 14:19 ` Oliver Kiddle
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).