~emersion/mrsh-dev

6 3

How to build imrsh?

Details
Message ID
<4dc999ee-af1a-3ce1-600c-3145c53a99cc@web.de>
DKIM signature
missing
Download raw message
Hi all,

I'm trying to compile imrsh. I could build mrsh using `./configure`,
`make` and `sudo make install`.

When I ran `meson build` in the imrsh folder, I got

     Run-time dependency mrsh found: NO (tried pkgconfig and cmake)

Next I tried `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig meson build`:

```
The Meson build system
Version: 1.1.0
Source dir: /media/home/max/repos/imrsh
Build dir: /media/home/max/repos/imrsh/build
Build type: native build
WARNING: failed to process netrc file: ~/.netrc access too permissive:
access permissions must restrict access to only the owner (None, line None).
Project name: imrsh
Project version: 0.1.0
C compiler for the host machine: cc (gcc 13.1.1 "cc (GCC) 13.1.1 20230429")
C linker for the host machine: cc ld.bfd 2.40.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -D_POSIX_C_SOURCE=200809L: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wimplicit-fallthrough=2: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=2: YES
Compiler for C supports arguments -Woverflow: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wno-missing-braces: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency mrsh found: YES 0.0.0
Run-time dependency tickit found: YES 0.4.3
Build targets in project: 1

Found ninja-1.11.1 at /usr/bin/ninja
Generating targets:   0%|
      | 0/1 [00
                              Writing build.ninja:   0%|
                                   | 0/32 [00
                                                            WARNING:
Running the setup command as `meson [options]` instead of `meson setup
[options]` is ambiguous and deprecated.
```

The command ends successfully but these "0/1" and "0/32" look wrong.

Nevertheless I tried `ninja -C build`. But it fails:

```
ninja: Entering directory `build'
[1/1] Linking target imrsh
FAILED: imrsh
cc  -o imrsh imrsh.p/src_history.c.o imrsh.p/src_interactive.c.o
imrsh.p/src_main.c.o -Wl,--as-needed -Wl,--no-undefined
-Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib
-Wl,--start-group /usr/local/lib/libmrsh.so /usr/local/lib/libtickit.so
-Wl,--end-group
/usr/bin/ld: imrsh.p/src_interactive.c.o: in function `buffer_insert':
/media/home/max/repos/imrsh/build/../src/interactive.c:14: undefined
reference to `mrsh_buffer_add'
/usr/bin/ld: imrsh.p/src_interactive.c.o: in function
`imrsh_print_from_cursor':
/media/home/max/repos/imrsh/build/../src/interactive.c:24: undefined
reference to `mrsh_buffer_append_char'
...
```

Any idea what's wrong?

Best regards
Max
Details
Message ID
<CSVSGKGB9XJ5.39600TNFBPAV5@eiger>
In-Reply-To
<4dc999ee-af1a-3ce1-600c-3145c53a99cc@web.de> (view parent)
DKIM signature
missing
Download raw message
https://git.sr.ht/~sircmpwn/imrsh is unmaintained,
https://git.d2evs.net/~ecs/imrsh should just work so long as you have
libmrsh installed. Also note that upstream mrsh isn't particularly
maintained either, so ymmv
Details
Message ID
<CSW9W8Q1X8QI.1IHNLJQJOJ6Z3@butia>
In-Reply-To
<CSVSGKGB9XJ5.39600TNFBPAV5@eiger> (view parent)
DKIM signature
missing
Download raw message
On Thu May 25, 2023 at 9:38 PM -03, Ember Sawady wrote:
> https://git.sr.ht/~sircmpwn/imrsh is unmaintained,
> https://git.d2evs.net/~ecs/imrsh should just work so long as you have
> libmrsh installed. Also note that upstream mrsh isn't particularly
> maintained either, so ymmv

To be quite honest, I've tried to build imrsh right when it was
announced and it never worked out of the box. I remember spending quite
an amount of time trying to get it right, but it wasn't by just
following the README from both projects, and at some point, I just gave
up.
Details
Message ID
<4d5a0c4e-710f-a498-b0e4-266d57328272@web.de>
In-Reply-To
<CSVSGKGB9XJ5.39600TNFBPAV5@eiger> (view parent)
DKIM signature
missing
Download raw message
 > https://git.d2evs.net/~ecs/imrsh should just work so long as you have
libmrsh installed. Also note that upstream mrsh isn't particularly
maintained either, so ymmv

Thank you. I'm trying ~ecs/imrsh now. `haredo run` fails:

```
$ LD_LIBRARY_PATH=/usr/local/lib haredo run
haredo run
haredo   all
Abort: ./hare/module/scan.ha:345:4: type assertion failed
/media/home/max/repos/imrsh/all.do: line 2:  8263 Aborted
  (core dumped) LD=cc $HARE build -o imrsh -lmrsh
haredo   all (error: exited with status 134)
haredo run (child failed)
```

all.do:

```
# XXX: don't feel like debugging this right now
LD=cc $HARE build -o imrsh -lmrsh
```

Does this mean it fails for you, too?
Details
Message ID
<CSWK5UVLO584.IA5VQX29GNN3@eiger>
In-Reply-To
<4d5a0c4e-710f-a498-b0e4-266d57328272@web.de> (view parent)
DKIM signature
missing
Download raw message
On Fri May 26, 2023 at 8:01 PM UTC, Max Schillinger wrote:
> Abort: ./hare/module/scan.ha:345:4: type assertion failed
> /media/home/max/repos/imrsh/all.do: line 2:  8263 Aborted
>   (core dumped) LD=cc $HARE build -o imrsh -lmrsh

Should be fixed with module3, can't be bothered to do anything to fix
compilation before that's merged. It's probably a symlink or other
non-normal file somewhere, but you should read the relevant part of
hare/module/scan.ha to verify that
Details
Message ID
<7ad29c0c-e9b7-20c5-9bc6-096ce3b46574@web.de>
In-Reply-To
<CSVSGKGB9XJ5.39600TNFBPAV5@eiger> (view parent)
DKIM signature
missing
Download raw message
 > Should be fixed with module3, can't be bothered to do anything to fix
 > compilation before that's merged.

What's module3? Is there a not yet merged patch for that?

 >  It's probably a symlink or other
 > non-normal file somewhere, but you should read the relevant part of
 > hare/module/scan.ha to verify that

The type assertion happens in type_for_ext call with the argument
"/home/max/repos/mrsh/mrsh" (the mrsh executable).

To check this I have added the following line to
`~/repos/hare/hare/module/scan.ha`:

     fmt::errorfln("type_for_ext({})", name)!;

This change had no effect until I have recompiled hare (make && sudo
make install). What's the point then in adding ~/repos/hare to the
HAREPATH? I thought I could use my modified stdlib by doing so.

How do you debug Hare code? I've seen in another mail that somebody
suggested using gdb. But when I use gdb with Hare, I only see assembler
files. Is this the best I can get (for now)?
Details
Message ID
<CSXFUJQXE7BK.3NO65NP1G5K2O@eiger>
In-Reply-To
<7ad29c0c-e9b7-20c5-9bc6-096ce3b46574@web.de> (view parent)
DKIM signature
missing
Download raw message
This conversation doesn't really belong on mrsh-dev

On Sat May 27, 2023 at 9:11 PM UTC, Max Schillinger wrote:
>  > Should be fixed with module3, can't be bothered to do anything to fix
>  > compilation before that's merged.
>
> What's module3? Is there a not yet merged patch for that?

I'm rewriting the build driver

>  >  It's probably a symlink or other
>  > non-normal file somewhere, but you should read the relevant part of
>  > hare/module/scan.ha to verify that
>
> The type assertion happens in type_for_ext call with the argument
> "/home/max/repos/mrsh/mrsh" (the mrsh executable).

Not sure, don't want to debug since this code will be gone soon anyways

> How do you debug Hare code? I've seen in another mail that somebody
> suggested using gdb. But when I use gdb with Hare, I only see assembler
> files. Is this the best I can get (for now)?

printf debugging, gdb with asm, all the other debugging tools for C.
We'll get DWARF support some day
Reply to thread Export thread (mbox)