rl_json icon indicating copy to clipboard operation
rl_json copied to clipboard

Configure missing

Open emillaurin opened this issue 2 years ago • 8 comments

It seems like configure is missing

It could just be me, but all instructions that I've found refer to running configure first. e.g., ./configure && make test && sudo make install. I'm not sure how to proceed.

Aside: It would be handy for new users if there was a short paragraph included in the readme on installing rl_json.

emillaurin avatar Feb 23 '23 04:02 emillaurin

I've tried the following command and got errors ( tag 0.12.2).

autoconf
/usr/bin/m4:aclocal.m4:5: cannot open `tclconfig/tcl.m4': No such file or directory
/usr/bin/m4:aclocal.m4:11: cannot open `teabase/teabase.m4': No such file or directory
autom4te-2.60: /usr/bin/m4 failed with exit status: 1

As I understand the archive from tag doesn't contain the necessary files in directories tclconfig and teabase. Could you add them in archives?

oupfiz5 avatar May 01 '23 09:05 oupfiz5

Tclconfig is a git submodule, clone the repo recursively to pull in this and the other required submodules

On Mon, May 1, 2023 at 11:45 AM oupfiz5 @.***> wrote:

I've tried the following command and got errors ( tag 0.12.2).

autoconf /usr/bin/m4:aclocal.m4:5: cannot open tclconfig/tcl.m4': No such file or directory/usr/bin/m4:aclocal.m4:11: cannot open teabase/teabase.m4': No such file or directoryautom4te-2.60: /usr/bin/m4 failed with exit status: 1

As I understand the archive from tag doesn't contain the necessary files in directories tclconfig and teabase. Could you add them in archives?

— Reply to this email directly, view it on GitHub https://github.com/RubyLane/rl_json/issues/41#issuecomment-1529526725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZHPTAZO3EKPIKJGMLK2MDXD6A4LANCNFSM6AAAAAAVFD2CDY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cyanogilvie avatar May 01 '23 09:05 cyanogilvie

configure is a generated file, you need to run autoconf to create it. I've followed the common practice of not checking generated files into the version control history, only the source files that form input into that generation (mostly - the exception in this project is that the stubs info created by make genstubs is committed, following the practice of the Tcl core and similar. make genstubs is an arcane enough step that I felt it was warranted).

It seems like configure is missing

It could just be me, but all instructions that I've found refer to running configure first. e.g., ./configure && make test && sudo make install. I'm not sure how to proceed.

Aside: It would be handy for new users if there was a short paragraph included in the readme on installing rl_json.

cyanogilvie avatar May 01 '23 09:05 cyanogilvie

Tclconfig is a git submodule, clone the repo recursively to pull in this and the other required submodules

I've extracted files from https://github.com/RubyLane/rl_json/archive/refs/tags/0.12.2.tar.gz . This archive doesn't contain submodules files.

FYI I've compiled from source using following sequence steps (pay attention: I need only release branch (0.12.2) and don't need git history):

git clone --recurse-submodules --depth 1 --branch 0.12.2 https://github.com/RubyLane/rl_json.git rl_json-0.12.2
cd rl_json-0.12.2
autoconf
./configure
./make
./make install

oupfiz5 avatar May 01 '23 10:05 oupfiz5

Yes, I usually add --shallow-submodules and --single-branch in there too, when integrating it into some build system. For example, the relevant section of Dockerfile from cyanogilvie/alpine-tcl (alpine linux based container image with tcl8.7 runtime and the few dozen packages I always need) is:

FROM alpine-tcl-build-base AS package-rl_json
WORKDIR /src/rl_json
RUN git clone --recurse-submodules --shallow-submodules --branch 0.12.2 --single-branch --depth 1 https://github.com/RubyLane/rl_json .
RUN autoconf && ./configure CFLAGS="${CFLAGS}" --enable-symbols && \
    make -j 8 all && \
    make DESTDIR=/out install-binaries install-libraries clean

It's not so important for rl_json currently but may be in some future release - re2c seems to creep into all my projects at some point and some of its submodules are large.

On Mon, May 1, 2023 at 12:32 PM oupfiz5 @.***> wrote:

Tclconfig is a git submodule, clone the repo recursively to pull in this and the other required submodules … <#m_-2288066158233167186_>

I've extracted files from https://github.com/RubyLane/rl_json/archive/refs/tags/0.12.2.tar.gz . This archive doesn't contains submodules files.

FYI I've compiled from source using following sequence steps (pay attention: I need only release branch (0.12.2) and don't need git history):

git clone --recurse-submodules --depth 1 --branch 0.12.2 https://github.com/RubyLane/rl_json.git rl_json-0.12.2cd rl_json-0.12.2 autoconf ./configure ./make ./make install

— Reply to this email directly, view it on GitHub https://github.com/RubyLane/rl_json/issues/41#issuecomment-1529561374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZHPTDFLH3RF2PXMK6T52TXD6GLVANCNFSM6AAAAAAVFD2CDY . You are receiving this because you commented.Message ID: @.***>

cyanogilvie avatar May 01 '23 10:05 cyanogilvie

@cyanogilvie I will try to describe my thoughts more clearly :).

Some time ago I used archive https://github.com/RubyLane/rl_json/archive/refs/tags/0.11.2.tar.gz . It still has directory tclconfig with necessary files. Earlier I could download archive, extract, make autoconf, configure etc. to my Dockerfile. Now I need to upload source code only via git first and after that do autoconf, configure etc. As for me, the earlier procedure when archive contains all files and may be installed from the source directly is much more simple than installation using git (it is only my opinion).

oupfiz5 avatar May 01 '23 19:05 oupfiz5

Yes, but I maintain a lot of projects (over 50 on github alone, some of which are themselves collections of TEA extensions), and updating the common parts became unmanageable. Many of my Tcl extensions use custom Tcl_ObjTypes via the TIP445 interface. When the spelling of those calls changed I had thousands of lines of code in dozens of projects to update, as well as the TIP445 shim for older tcl versions, and the autoconf machinery for determining whether it was needed. The same for the common parts of the build system, benchmarking rigs, debugger / coverage / memory debugging helpers, etc. So I factored out as much of the common parts as possible and included those in each project as git submodules. In the early days git submodules were rough but they're matured now and an excellent way to express these sorts of tight version coupling between projects. The version tags in github are points in time, not releases (although you can download a tar of the code by them, they're different to releases). If the projects had their own release manager or I only had a few I could do proper releases, but I have to squeeze this work into my own unpaid time. I opensource what I can because I benefit from other's opensource work and I'd like to return the favour, but I don't gain anything directly from people using it, so I'd rather spend the time and effort on building new things I need than doing release management work to add this last step of polish.

That said, it's really no harder to incorporate the projects into a Dockerfile (which I do a lot), and actually works better (fetching the tar file by tag would fail intermittently for me when some of my very large Dockerfiles with dozens of github projects would fail their tar fetches. Never happens with git fetches):

Old way (tar from tag):

WORKDIR /src/rl_json
RUN wget https://github.com/RubyLane/rl_json/archive/c5a8033.tar.gz -O - |
tar xz --strip-components=1 && \
    autoconf && ./configure CFLAGS="${CFLAGS}" --enable-symbols && \
    make -j 8 all && \
    make install-binaries install-libraries

New way (shallow git fetch with submodules)

WORKDIR /src/rl_json
RUN git clone --recurse-submodules --shallow-submodules --branch 0.12.2
--single-branch --depth 1 https://github.com/RubyLane/rl_json .
RUN autoconf && ./configure CFLAGS="${CFLAGS}" --enable-symbols && \
    make -j 8 all && \
    make install-binaries install-libraries

On Mon, May 1, 2023 at 9:28 PM oupfiz5 @.***> wrote:

@cyanogilvie https://github.com/cyanogilvie I will try to describe my thoughts more clearly :).

Some time ago I used archive https://github.com/RubyLane/rl_json/archive/refs/tags/0.11.2.tar.gz . It still has directory tclconfig with necessary files. Earlier I could download archive, extract, make autoconf, configure etc. to my Dockerfile. Now I need to upload source code only via git first and after that do autoconf, configure etc. As for me, the earlier procedure when archive contains all files and may be installed from the source directly is much more simple than installation using git (it is only my opinion).

— Reply to this email directly, view it on GitHub https://github.com/RubyLane/rl_json/issues/41#issuecomment-1530110581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZHPTDTBNYXAOUTKDIFNETXEAFHVANCNFSM6AAAAAAVFD2CDY . You are receiving this because you were mentioned.Message ID: @.***>

cyanogilvie avatar May 02 '23 13:05 cyanogilvie

git fetch with submodules does the trick (just needed to add sudo for the last make install-binaries install libraries to work on my system)

git clone --recurse-submodules --shallow-submodules --branch 0.12.2 --single-branch --depth 1 https://github.com/RubyLane/rl_json autoconf && ./configure CFLAGS="${CFLAGS}" --enable-symbols && make -j 8 all && sudo make install-binaries install-libraries

emillaurin avatar May 27 '24 22:05 emillaurin