Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.unix undefined variable and missing file #63

Closed
mgerrard opened this issue Feb 22, 2023 · 19 comments
Closed

Makefile.unix undefined variable and missing file #63

mgerrard opened this issue Feb 22, 2023 · 19 comments
Labels

Comments

@mgerrard
Copy link

The INSTALL variable is not defined in Makefile.unix, and the Makefile looks for a file named 'ctwill.1' that is not present in the archived ctwill project.

@ascherer
Copy link
Owner

I don't think that I ever invoked make -f Makefile.unix install directly. All is prepared by cwebbin.spec nicely:

  • INSTALL is set to install in %make_install
  • ctwill.1 is created from ctwill.md by pandoc

@mgerrard
Copy link
Author

I see, thanks. I was following the steps in README.txt (specifically, step 5).

@ascherer ascherer reopened this Feb 22, 2023
@ascherer
Copy link
Owner

I'll have to call this deprecated.

@mgerrard
Copy link
Author

I'm on Ubuntu 22.04, and after installing debbuild (version 22.02.1) and performing the setup steps described in the "advanced packaging" section on the README.md, upon running debbuild -bi SPECS/cwebbin.spec --with texlive, I see the error message: Exec of /var/tmp/deb-tmp.prep.59800 failed (%prep): 512. I looked into cwebbin.spec and the debbuild repo, but I'm not sure how to get past this error.

@ascherer
Copy link
Owner

Please submit that file.

@mgerrard
Copy link
Author

#!/bin/sh

  RPM_SOURCE_DIR="/home/mjg6v/debbuild/SOURCES"
  RPM_BUILD_DIR="/home/mjg6v/debbuild/BUILD"
  RPM_OPT_FLAGS="-O2 -g"
  RPM_ARCH="amd64"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="cwebbin-texlive"
  RPM_PACKAGE_VERSION="4.8"
  RPM_PACKAGE_RELEASE="2022.2"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  LANG=C
  export LANG
  unset CDPATH DISPLAY ||:
  RPM_BUILD_ROOT="/var/tmp/cwebbin-texlive-4.8-root"
  export RPM_BUILD_ROOT
 
  exec > /dev/null
  umask 022
  cd "$RPM_BUILD_DIR"
/bin/rm -rf 'cwebbin-texlive-4.8'
/bin/mkdir -p cwebbin-texlive-4.8
cd 'cwebbin-texlive-4.8'
/bin/gzip -dc '/home/mjg6v/debbuild/SOURCES/ctwill.tar.gz' | /bin/tar -xf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/bin/gzip -dc '/home/mjg6v/debbuild/SOURCES/cweb-4.8.tar.gz' | /bin/tar -xf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/bin/gzip -dc '/home/mjg6v/debbuild/SOURCES/cwebbin-2022.2.tar.gz' | /bin/tar -xf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/bin/chmod -Rf a+rX,u+w,go-w .

/usr/bin/test -r /home/mjg6v/debbuild/SOURCES/0001-Support-extended-syntax-for-numeric-literals.patch || { /bin/echo 'Cannot read /home/mjg6v/debbuild/SOURCES/0001-Support-extended-syntax-for-numeric-literals.patch'; exit 1; }
/bin/cat /home/mjg6v/debbuild/SOURCES/0001-Support-extended-syntax-for-numeric-literals.patch | 
/usr/bin/patch  -s -F 0 --no-backup-if-mismatch
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/usr/bin/test -r /home/mjg6v/debbuild/SOURCES/0002-Purge-redundant-TeX-macro.patch || { /bin/echo 'Cannot read /home/mjg6v/debbuild/SOURCES/0002-Purge-redundant-TeX-macro.patch'; exit 1; }
/bin/cat /home/mjg6v/debbuild/SOURCES/0002-Purge-redundant-TeX-macro.patch | 
/usr/bin/patch  -s -F 0 --no-backup-if-mismatch
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/usr/bin/test -r /home/mjg6v/debbuild/SOURCES/0003-Adapt-to-CWEB-4.5.patch || { /bin/echo 'Cannot read /home/mjg6v/debbuild/SOURCES/0003-Adapt-to-CWEB-4.5.patch'; exit 1; }
/bin/cat /home/mjg6v/debbuild/SOURCES/0003-Adapt-to-CWEB-4.5.patch | 
/usr/bin/patch  -s -F 0 --no-backup-if-mismatch
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
/usr/bin/test -r /home/mjg6v/debbuild/SOURCES/0004-Add-silent-datecontentspage-macro.patch || { /bin/echo 'Cannot read /home/mjg6v/debbuild/SOURCES/0004-Add-silent-datecontentspage-macro.patch'; exit 1; }
/bin/cat /home/mjg6v/debbuild/SOURCES/0004-Add-silent-datecontentspage-macro.patch | 
/usr/bin/patch  -s -F 0 --no-backup-if-mismatch
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi

for f in Makefile.unix po/cweb.pot po/*/cweb.po
do /bin/sed -i -e "s/@@VERSION@@/Version 4.8 [CWEBbin 2022.2]/" $f; done

/bin/sed -i -e "s/# \(.*-texlive\)/\1/" Makefile.unix



exit $?

@ascherer
Copy link
Owner

What is the output when you run this script?

@mgerrard
Copy link
Author

./deb-tmp.prep.54395.sh: 23: cd: can't cd to /home/mjg6v/debbuild/BUILD
gzip: /home/mjg6v/debbuild/SOURCES/ctwill.tar.gz: No such file or directory
/bin/tar: This does not look like a tar archive
/bin/tar: Exiting with failure status due to previous errors

@mgerrard
Copy link
Author

I'll create a debbuild folder in my home directory, copy the relevant build arena files, and try again.

@mgerrard
Copy link
Author

That change ran without errors.

@mgerrard
Copy link
Author

Now when I run debbuild -bi SPECS/cwebbin.spec --with texlive I see the message * Warning: texlive is probably installed but seems to be a virtual package.. When I run cweave --version I still see the CWEAVE 4.4 (TeX Live 2022/dev/Debian) banner.

@mgerrard
Copy link
Author

I see there are further steps to execute in the cweb for texlive section, please disregard the last comment.

@ascherer
Copy link
Owner

I think you're on a good way.

@mgerrard
Copy link
Author

My system does not have a texk directory. I installed texlive-full using Debian's package manager. Is installing texlive from source required?

@mgerrard
Copy link
Author

I'm trying to update cweb from the TeXlive version (4.4) because I am getting errors that I do not get using DEK's old version. On the following CWEB file:

@ A trivial program.

@c
#include<stdio.h>
int main() {
  printf("hello, world\n");
}

After running cweave trivial.w and then tex trivial.tex, I see the error message

This is TeX, Version 3.141592653 (TeX Live 2022/dev/Debian) (preloaded format=tex)
(./trivial.tex (/usr/share/texlive/texmf-dist/tex/plain/cweb/cwebmac.tex)
Index: (./trivial.idx)
! Missing control sequence inserted.
<inserted text> 
                \inaccessible 
<to be read again> 
                   {
<argument> ...\let \delimiter "5267309 =\RB \let {
                                                  \accent "7E =}\TL \let \ =...

\takethree #1#2#3->#3
                     
\rheader ...htrm \qquad \title \hfill \grouptitle 
                                                  \qquad \mainfont \the \pag...

\normaloutput ... {\vbox to10pt{}\ifodd \pageno #3
                                                  \else #2\fi }\fi \vfill #1...
...
l.14 \fin
         
?

which I can avoid by not include any index, but I would like to have an index for some programs. Do you know if I am doing something wrong or have something misconfigured?

@ascherer
Copy link
Owner

I'm trying to update cweb from the TeXlive version (4.4)

Ouch, that's way old! (June 2021); TeX Live 2022 shipped with CWEB 4.7 and currently has 4.8[.1]. Note that in about three weeks, TeX Live 2023 will be released: https://www.tug.org/texlive/

My recommendation: Please uninstall all Debian packages of TeX Live and replace them with the genuine product as described here: https://www.tug.org/texlive/quickinstall.html

You may want to keep the Debian package manager satisfied by following this recipe: https://www.tug.org/texlive/debian.html#vanilla

Compiling TeX Live locally requires the full source tree: https://www.tug.org/texlive/svn/

@mgerrard
Copy link
Author

OK, I'll put the genuine TeX Live product on my machine. Thanks for the help!

@ascherer
Copy link
Owner

After running cweave trivial.w and then tex trivial.tex, I see the error message

It seems you ran into ascherer/cweb#41

The misbehaviour for trivial CWEB input (no starred sections) started with cwebmac.tex 4.6 and was only recently fixed in cwebmac.tex 4.9 (shipped with current TeX Live). I have no idea why Debian would ship cweave 4.4 with cwebmac.tex 4.6.

@mgerrard
Copy link
Author

My recommendation: Please uninstall all Debian packages of TeX Live and replace them with the genuine product

Thanks, the real deal is now on my machine.

recently fixed in cwebmac.tex 4.9

Great, I'll update TeX Live in a few weeks. I'll use starred sections, which is probably good practice anyways. Thanks again for your help.

ascherer added a commit that referenced this issue Feb 25, 2023
Noone should clobber their system folders with CWEBbin directly.
You are strongly advised to use deb- or rpm-packages for installation
amd removal of this stuff (or work in a local directory only).

'make -f Makefile.unix install' will not work anyway.
ascherer added a commit that referenced this issue May 14, 2023
Noone should clobber their system folders with CWEBbin directly.
You are strongly advised to use deb- or rpm-packages for installation
and removal of this stuff (or work in a local directory only).

'make -f Makefile.unix install' will not work anyway.
ascherer added a commit that referenced this issue May 15, 2023
Fix issues #61, #62, and #64; clarify issue #63.

Use iftex.sty to test for TeX engine.
Revert a few occurrences of '\ifacro', synonymous for '\ifpdf'.

'$' is permitted in C identifiers (CTANGLE).
Add option '+u' for CTANGLE (poor man's UTF-8 transliteration).

Improve PDF validation, following advice from 3-Height PDF Validator.
NOS has 'count \I' subentries.
ascherer added a commit that referenced this issue May 16, 2023
Fix issues #61, #62, and #64; clarify issue #63.

Use iftex.sty to test for TeX engine.
Revert a few occurrences of '\ifacro', synonymous for '\ifpdf'.

'$' is permitted in C identifiers (CTANGLE).
Add option '+u' for CTANGLE (poor man's UTF-8 transliteration).

Improve PDF validation, following advice from 3-Height PDF Validator.
NOS has 'count \I' subentries.
ascherer added a commit that referenced this issue May 18, 2023
Fix issues #61, #62, and #64; clarify issue #63.

Use iftex.sty to test for TeX engine.
Revert a few occurrences of '\ifacro', synonymous for '\ifpdf'.

'$' is permitted in C identifiers (CTANGLE).
Add option '+u' for CTANGLE (poor man's UTF-8 transliteration).

Improve PDF validation, following advice from 3-Height PDF Validator.
NOS has 'count \I' subentries.
ascherer added a commit that referenced this issue May 18, 2023
Fix issues #61, #62, and #64; clarify issue #63.

Use iftex.sty to test for TeX engine.
Revert a few occurrences of '\ifacro', synonymous for '\ifpdf'.

'$' is permitted in C identifiers (CTANGLE).
Add option '+u' for CTANGLE (poor man's UTF-8 transliteration).

Improve PDF validation, following advice from 3-Height PDF Validator.
NOS has 'count \I' subentries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants