Post reply

Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: AL|EN
« on: June 18, 2021, 02:35:00 PM »

That's correct. The Cygwin-hosted non-MinGW OCaml produces binaries that are Cygwin-dependent, they do require cygwin.dll on Windows. So it was a wise recommendation to not use Cygwin OCaml build.

Note for future myself when I again forget about certain meanders of current WeiDU build system:

- follow https://fdopen.github.io/opam-repository-mingw/installation, create two different Cygwin installation for 32-bit and 64-bit
- for 64-bit you can try the graphical installer
- for 32-bit, ignore the graphical installer because it will have 64-bit Cygwin + 32-bit Ocaml which is not desired -> perform a manual installation of Cygwin 32-bit installation and follow 'Manual Installation' instruction to get opam32, then install desired OCaml variant using OPam
- put elkhound32.exe/elkhound64.exe into Cygwin\bin because you can't provide a full path inside the configuration

Posted by: Wisp
« on: June 18, 2021, 10:30:42 AM »

I have not looked into it in detail, but it might be that the Cygwin-hosted non-MinGW OCaml produces binaries that are Cygwin-dependent.
Posted by: AL|EN
« on: June 03, 2021, 04:48:31 AM »

I'm aware that Windows build instructions say that we need native Windows OCaml. Is there any specific reason to not use OCaml provided with Cygwin? More specifically, by using opam?
Posted by: AL|EN
« on: October 03, 2020, 05:36:17 AM »

@wisp I can't find revelant GitHub issue where there was discussion regarding new build system for weidu. Now, since the maintainer of the WeiDU Mac is gone, I think it would be the best to create CI in order to build and create weidu releases. I could give it a try (since it's relatively easy for someone with my tech background) but this can happen only after the new build system are in place so there won't be huge amount of duplicated work.
Posted by: Wisp
« on: December 28, 2019, 03:17:42 PM »

Well, all UPX does is reduce the on-disk file size by a few MiB, so if that causes segfaults, I suggest you don't use UPX. I don't know why it happens (segfaults are usually illegal attempts at accessing memory and UPX does memory stuff as part of the in-place decompression); I've probably used the same version at some point in the past.
Posted by: Magus_BGforge
« on: December 28, 2019, 08:24:46 AM »

Code: [Select]
ii  ocaml                           4.05.0-10ubuntu1     amd64                ML language implementation with a class-based object system

ii  upx-ucl                         3.94-4               amd64                efficient live-compressor for executables
Not using UPX results in an 8Mb binary, so it's definitely doing something. But this binary doesn't segfault.
I'm building with "make linux_zip".
Posted by: Wisp
« on: December 27, 2019, 01:15:46 PM »

I'm trying to build on Linux also, the build itself works fine, but the resulting binary segfaults on launch.
For some reason, it's also quite larger, even when I build the exact same tag (246):
Code: [Select]
-rwxr-xr-x 1 root root  1.6M Dec 27 06:09 weidu
-rwxr-xr-x 1 root root 1018K May 22  2019 weidu.246
UPX is installed and working. The OS is Ubuntu 18.04 x64.

Any advice?
Does not using UPX change anything? I mean, it's largely BS, anyway.

What version of OCaml are you using and how are you building? make weidu?
Posted by: Magus_BGforge
« on: December 27, 2019, 12:22:50 AM »

I'm trying to build on Linux also, the build itself works fine, but the resulting binary segfaults on launch.
For some reason, it's also quite larger, even when I build the exact same tag (246):
Code: [Select]
-rwxr-xr-x 1 root root  1.6M Dec 27 06:09 weidu
-rwxr-xr-x 1 root root 1018K May 22  2019 weidu.246
UPX is installed and working. The OS is Ubuntu 18.04 x64.

Any advice?
Posted by: AL|EN
« on: February 27, 2019, 02:33:10 AM »

The problem was non-standard path to 'elkhound' binary (even if executable bit was set):
Quote
ifeq "$(shell uname -m)" "x86_64"
         export WEIDU_ARCH = amd64
         export ELKHOUND_BIN = /home/a/elkhound64
      else
         export WEIDU_ARCH = x86
         export ELKHOUND_BIN = /home/a/elkhound 
      endif

as soon as I copied 'elkhound' and 'elkhound64' binaries to /usr/bin and changed paths to:

Quote
ifeq "$(shell uname -m)" "x86_64"
         export WEIDU_ARCH = amd64
         export ELKHOUND_BIN = elkhound64
      else
         export WEIDU_ARCH = x86
         export ELKHOUND_BIN = elkhound 
      endif

it worked. Linux works, let's now deal with Windows.
Posted by: Wisp
« on: February 26, 2019, 11:39:37 AM »

Please verify that you have elkhound on your path. If it is, you should get something from
Code: [Select]
which elkhound. If it's not already, getting elkhound onto your path might be as easy as putting it in ~/bin and restarting your terminal or otherwise re-running ~/.profile.
Posted by: AL|EN
« on: February 26, 2019, 03:43:23 AM »

Let's start with linux, Ubuntu 18.04.2 LTS 64-bit, clean installation, devel branch:


OPam:
Code: [Select]
a@ubuntu:~/weidu$ opam switch
#  switch                      compiler                    description
→  default                     ocaml-base-compiler.4.07.1  default
   ocaml-base-compiler.4.03.0  ocaml-base-compiler.4.03.0  ocaml-base-compiler.4.03.0
   ocaml-base-compiler.4.04.0  ocaml-base-compiler.4.04.0  ocaml-base-compiler.4.04.0

doesn't matter which OCaml version I use, every time I get this error:

Code: [Select]
a@ubuntu:~/weidu$ make
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/toldparser.mly
17 shift/reduce conflicts.
Generating dependency information for obj/x86_LINUX/toldparser.mli
ocaml str.cma unix.cma -w p scripts/make_gr.ml
ocaml src/trealparserin.gr
File "./src/trealparserin.gr", line 1, characters 0-2:
Error: Syntax error
Makefile.ocaml:243: recipe for target 'obj/x86_LINUX/trealparserin.mli' failed
make: [obj/x86_LINUX/trealparserin.mli] Error 2 (ignored)
mv: cannot stat 'src/trealparserin.ml': No such file or directory
mv: cannot stat 'src/trealparserin.mli': No such file or directory
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/dparser.mly
1 reduce/reduce conflict.
Generating dependency information for obj/x86_LINUX/dparser.mli
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/bafparser.mly
Generating dependency information for obj/x86_LINUX/bafparser.mli
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/refactordparser.mly
Generating dependency information for obj/x86_LINUX/refactordparser.mli
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/refactorbafparser.mly
Generating dependency information for obj/x86_LINUX/refactorbafparser.mli
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/bcsparser.mly
1 shift/reduce conflict.
Generating dependency information for obj/x86_LINUX/bcsparser.mli
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamlyacc  src/idsparser.mly
3 shift/reduce conflicts.
Generating dependency information for obj/x86_LINUX/idsparser.mli
Generating dependency information for hashtbl-4.03.0/myhashtbl.mli
Generating dependency information for batteries-lite/batList.mli
Generating dependency information for src/tolower.ml
Generating dependency information for src/weinstall.ml
Generating dependency information for src/myarg.ml
Generating dependency information for src/main.ml
Generating dependency information for src/autoupdate.ml
Generating dependency information for src/changelog.ml
Generating dependency information for src/tpwork.ml
Generating dependency information for src/tpaction.ml
Generating dependency information for src/tppatch.ml
Generating dependency information for src/tpuninstall.ml
Generating dependency information for src/tppe.ml
Generating dependency information for src/mymarshal.ml
Generating dependency information for src/parsewrappers.ml
cp src/tparser.in src/tparser.ml
Generating dependency information for src/tparser.ml
ocaml str.cma unix.cma -w p scripts/make_old_mll.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/toldlexer.mll
111 states, 589 transitions, table size 3022 bytes
1717 additional bytes used for bindings
Generating dependency information for obj/x86_LINUX/toldlexer.ml
Generating dependency information for obj/x86_LINUX/toldparser.ml
ocaml str.cma unix.cma -w p scripts/make_tll.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/tlexer.mll
114 states, 594 transitions, table size 3060 bytes
1735 additional bytes used for bindings
Generating dependency information for obj/x86_LINUX/tlexer.ml
Generating dependency information for src/tphelp.ml
Generating dependency information for src/tpstate.ml
Generating dependency information for src/kit.ml
Generating dependency information for src/automate.ml
Generating dependency information for elkhound/lrparse.ml
Generating dependency information for elkhound/glr.ml
Generating dependency information for elkhound/objpool.ml
Generating dependency information for elkhound/arraystack.ml
Generating dependency information for elkhound/parsetables.ml
Generating dependency information for elkhound/lexerint.ml
Generating dependency information for elkhound/useract.ml
Generating dependency information for elkhound/smutil.ml
Generating dependency information for src/json.ml
Generating dependency information for src/sql.ml
Generating dependency information for obj/x86_LINUX/dparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/dlexer.mll
60 states, 536 transitions, table size 2504 bytes
Generating dependency information for obj/x86_LINUX/dlexer.ml
Generating dependency information for src/tp.ml
Generating dependency information for src/mos.ml
Generating dependency information for src/sav.ml
Generating dependency information for src/diff.ml
Generating dependency information for src/myxdiff.ml
Generating dependency information for obj/x86_LINUX/bafparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/baflexer.mll
76 states, 748 transitions, table size 3448 bytes
Generating dependency information for obj/x86_LINUX/baflexer.ml
Generating dependency information for obj/x86_LINUX/refactordparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/refactordlexer.mll
39 states, 311 transitions, table size 1478 bytes
Generating dependency information for obj/x86_LINUX/refactordlexer.ml
Generating dependency information for obj/x86_LINUX/refactorbafparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/refactorbaflexer.mll
14 states, 371 transitions, table size 1568 bytes
Generating dependency information for obj/x86_LINUX/refactorbaflexer.ml
Generating dependency information for src/refactorbaf.ml
Generating dependency information for src/dc.ml
Generating dependency information for src/dlg.ml
Generating dependency information for obj/x86_LINUX/bcsparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/bcslexer.mll
51 states, 369 transitions, table size 1782 bytes
Generating dependency information for obj/x86_LINUX/bcslexer.ml
Generating dependency information for src/bcs.ml
Generating dependency information for obj/x86_LINUX/idsparser.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/idslexer2.mll
32 states, 699 transitions, table size 2988 bytes
Generating dependency information for obj/x86_LINUX/idslexer2.ml
/home/a/.opam/ocaml-base-compiler.4.03.0/bin/ocamllex src/idslexer.mll
33 states, 574 transitions, table size 2494 bytes
Generating dependency information for obj/x86_LINUX/idslexer.ml
Generating dependency information for src/ids.ml
Generating dependency information for src/cre.ml
Generating dependency information for src/load.ml
Generating dependency information for src/tlk.ml
Generating dependency information for src/biff.ml
Generating dependency information for src/cbif.ml
Generating dependency information for src/key.ml
Generating dependency information for src/xor.ml
echo "let associate_these a = Var.set_string \"WEIDU_ARCH\" \"amd64\" ; Var.set_string \"WEIDU_OS\" \"unix\"; Var.set_string \"WEIDU_VER\" !Util.weidu_version" > src/arch2.ml
echo "let _ = associate_these ()" >> src/arch2.ml
Generating dependency information for src/arch2.ml
Generating dependency information for src/var.ml
Generating dependency information for src/modder.ml
Generating dependency information for src/util.ml
ocaml str.cma unix.cma -w p -unsafe-string scripts/make_tph.ml
Generating dependency information for src/tph.ml
Generating dependency information for src/parsing.ml
Generating dependency information for src/version.ml
cp src/arch_unix.ml src/arch.ml
Generating dependency information for src/arch.ml
Generating dependency information for src/stats.ml
cp src/case_ins_linux.ml src/case_ins.ml
Generating dependency information for src/case_ins.ml
Generating dependency information for hashtbl-4.03.0/hashtblinit.ml
Generating dependency information for hashtbl-4.03.0/myhashtbl.ml
Generating dependency information for batteries-lite/batteriesInit.ml
Generating dependency information for batteries-lite/batList.ml
ocaml src/trealparserin.gr
File "./src/trealparserin.gr", line 1, characters 0-2:
Error: Syntax error
Makefile.ocaml:243: recipe for target 'obj/x86_LINUX/trealparserin.mli' failed
make: [obj/x86_LINUX/trealparserin.mli] Error 2 (ignored)
mv: cannot stat 'src/trealparserin.ml': No such file or directory
mv: cannot stat 'src/trealparserin.mli': No such file or directory
Compiling interface batteries-lite/batList.mli
Compiling batteries-lite/batList.ml to native code
File "batteries-lite/batList.ml", line 633, characters 17-21:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
File "batteries-lite/batList.ml", line 637, characters 17-21:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
Compiling batteries-lite/batteriesInit.ml to native code
Compiling interface hashtbl-4.03.0/myhashtbl.mli
Compiling hashtbl-4.03.0/myhashtbl.ml to native code
Compiling hashtbl-4.03.0/hashtblinit.ml to native code
Compiling src/case_ins.ml to native code
Compiling src/stats.ml to native code
Compiling src/arch.ml to native code
Compiling src/version.ml to native code
Compiling src/parsing.ml to native code
Compiling src/tph.ml to native code
Compiling src/util.ml to native code
File "src/util.ml", line 485, characters 4-15:
Warning 3: deprecated: String.copy
Compiling src/modder.ml to native code
Compiling src/var.ml to native code
Compiling src/arch2.ml to native code
Compiling src/xor.ml to native code
Compiling src/key.ml to native code
Compiling src/cbif.ml to native code
Compiling src/biff.ml to native code
Compiling src/tlk.ml to native code
Compiling src/load.ml to native code
File "src/load.ml", line 646, characters 25-40:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
File "_none_", line 1:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
Compiling src/cre.ml to native code
Compiling src/ids.ml to native code
Compiling interface obj/x86_LINUX/idsparser.mli
Compiling obj/x86_LINUX/idsparser.ml to native code
Compiling obj/x86_LINUX/idslexer.ml to native code
Compiling obj/x86_LINUX/idslexer2.ml to native code
Compiling src/bcs.ml to native code
File "src/bcs.ml", line 226, characters 59-74:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
File "src/bcs.ml", line 375, characters 34-49:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
Compiling interface obj/x86_LINUX/bcsparser.mli
Compiling obj/x86_LINUX/bcsparser.ml to native code
Compiling obj/x86_LINUX/bcslexer.ml to native code
Compiling src/dlg.ml to native code
Compiling src/dc.ml to native code
Compiling src/refactorbaf.ml to native code
Compiling interface obj/x86_LINUX/refactorbafparser.mli
Compiling obj/x86_LINUX/refactorbafparser.ml to native code
Compiling obj/x86_LINUX/refactorbaflexer.ml to native code
Compiling interface obj/x86_LINUX/refactordparser.mli
Compiling obj/x86_LINUX/refactordparser.ml to native code
Compiling obj/x86_LINUX/refactordlexer.ml to native code
Compiling interface obj/x86_LINUX/bafparser.mli
Compiling obj/x86_LINUX/bafparser.ml to native code
Compiling obj/x86_LINUX/baflexer.ml to native code
Compiling src/myxdiff.ml to native code
Compiling src/diff.ml to native code
Compiling src/sav.ml to native code
File "src/sav.ml", line 42, characters 25-37:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
File "src/sav.ml", line 43, characters 25-46:
Warning 52: the argument of this constructor should not be matched against a
constant pattern; the actual value of the argument could change
in the future.
Compiling src/mos.ml to native code
Compiling src/tp.ml to native code
Compiling interface obj/x86_LINUX/dparser.mli
Compiling obj/x86_LINUX/dparser.ml to native code
File "src/dparser.mly", line 42, characters 37-48:
Warning 3: deprecated: String.copy
Compiling obj/x86_LINUX/dlexer.ml to native code
Compiling src/sql.ml to native code
Compiling src/json.ml to native code
Compiling elkhound/smutil.ml to native code
Compiling elkhound/useract.ml to native code
Compiling elkhound/lexerint.ml to native code
Compiling elkhound/parsetables.ml to native code
Compiling elkhound/arraystack.ml to native code
Compiling elkhound/objpool.ml to native code
Compiling elkhound/glr.ml to native code
Compiling elkhound/lrparse.ml to native code
Compiling src/automate.ml to native code
Compiling src/kit.ml to native code
Compiling src/tpstate.ml to native code
Compiling src/tphelp.ml to native code
make: *** No rule to make target 'obj/x86_LINUX/trealparserin.ml', needed by 'obj/x86_LINUX/trealparser.ml'.  Stop.
Posted by: Wisp
« on: February 23, 2019, 04:39:15 AM »

You need to be more specific about what problems you are having. What error messages you are getting, at which point they appear, and so on.
Posted by: AL|EN
« on: February 22, 2019, 06:48:37 AM »

Well, linux build also failing with syntax errors. Tested with xubuntu 18.04, OCaml 4.03.1 and 4.07.1 master/devel.
Posted by: AL|EN
« on: February 20, 2019, 01:37:33 PM »

Very good idea, something which I would proposed myself but since I was sure that you are aware about the benefits, I assumed that you are simply too busy to handle such change.

BTW: My previous build env stooped working, now no matter what I do, I can't compile weidu for windows. Instructions have dependency on too many moving parts, is unclear how to install OCaml for windows etc. Could you just simply zip whole cygwin + ocaml folders and post it as archives, so anyone can simply download, extract, change paths inside configuration and run make?
Posted by: Wisp
« on: February 20, 2019, 11:42:30 AM »

https://github.com/WeiDUorg/elkhound/releases
I'll be moving the binary distribution to github.