c:\cygwin64\bin\bash.exe -c -l "cd `cygpath -u 'C:\dev\openEHR\adl-archetypes'`; git config --get remote.origin.url"
do_system_run_command_query (a_cmd_line: STRING; in_directory: detachable STRING) -- run `a_cmd_line' and return result; run process in specified directory if set local pf: PROCESS_FACTORY proc: PROCESS do last_command_result_cache.put (create {PROCESS_RESULT}.make (a_cmd_line, in_directory)) create pf proc := pf.process_launcher_with_command_line (a_cmd_line, in_directory) proc.set_hidden (True) proc.redirect_input_to_stream proc.redirect_error_to_agent (agent (s: STRING) do last_command_result.append_stderr (s) end) proc.redirect_output_to_agent (agent (s: STRING) do last_command_result.append_stdout (s) end) proc.launch proc.wait_for_exit last_command_result.set_exit_code (proc.exit_code) end
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/b126f577-0d0a-43ce-a2be-9cfe286593cd%40googlegroups.com.
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2$ wrap_c --verbose --output-dir=$LIB_PATH/library/generated_wrapper --full-header=$LIB_PATH/library/C/include/git2.h config.xml
[100%] phase 1: parsing
parsed successfuly
found:
. 1954 types
. 948 declarations
[100%] phase 2: resolving aliases for anonymous types
[100%] phase 3: wrapping declarations
[100%] phase 3: selecting types to wrap
[100%] phase 3: wrapping types
[100%] phase 3: resolving feature name clashes
found:
. 77 enum wrappers
. 144 struct wrappers
. 7 union wrappers
. 1536 function wrappers
. 66 callback wrappers
[100%] phase 4: generating enum wrappers
[100%] phase 4: generating struct wrappers
[100%] phase 4: generating union wrappers
[100%] phase 4: generating function wrappers
[100%] phase 4: generating function callback wrappers
phase 5: generating Makefiles and WrapC header
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2/library/generated_wrapper/c/src$ ls -lt
total 216
-rw-r--r-- 1 thomas thomas 504 Apr 1 10:41 build.eant
-rw-r--r-- 1 thomas thomas 1090 Apr 1 10:41 Makefile.SH
-rw-r--r-- 1 thomas thomas 898 Apr 1 10:41 Makefile-win.SH
-rw-r--r-- 1 thomas thomas 184216 Apr 1 10:41 ewg_unknown_callback_c_glue_code.c
-rw-r--r-- 1 thomas thomas 22099 Mar 31 20:16 ewg_libgit2_callback_c_glue_code.c
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2/library/generated_wrapper/c/src$
finish_freezing -library
Eiffel C/C++ Compilation Tool - Version 19.05
Copyright Eiffel Software 1985-2019. All Rights Reserved
Generating C libraries ...
Extracting ./Makefile (with variable substitutions)
Package unknown was not found in the pkg-config search path.
Perhaps you should add the directory containing `unknown.pc'
to the PKG_CONFIG_PATH environment variable
No package 'unknown' found
C compilation completed
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2/library/generated_wrapper/c/src$
ls /usr/local/lib/pkgconfig
libgit2.pc
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2/library$ ls C/spec/linux-x86-64/lib/
eif_unknown.a
eif_libgit2.a
Preparing C compilation
Compiling C code in E1
gcc: error: /home/thomas/Eiffel/eiffel-wrap-c/wrap_libgit2/library/C/spec/linux-x86-64/lib/eif_libgit2.a: No such file or directory
make: *** [Makefile:171: git_status] Error 1
Getting closer...now when using wrap_c, according to the wrap_libgit2 README, I get:
wrap_c --verbose --output-dir=$LIB_PATH/library/generated_wrapper --full-header=$LIB_PATH/library/C/include/git2.h --config=$LIB_PATH/library/config.xml
<ewg_config name="libgit2">
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2/library$ ls C/spec/linux-x86-64/lib/
eif_unknown.a
Whereas the build of a wrap_libgit2 example is expectingeif_libgit2.a
Preparing C compilation
Compiling C code in E1
gcc: error: /home/thomas/Eiffel/eiffel-wrap-c/wrap_libgit2/library/C/spec/linux-x86-64/lib/eif_libgit2.a: No such file or directory
make: *** [Makefile:171: git_status] Error 1At the moment I don't know what the 'unknown_callback' lib is about, or why the other one is not being built.
- thomas
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2$ git_status
git_status: error while loading shared libraries: libgit2.so.0.99: cannot open shared object file: No such file or directory
thomas@Meduse-VB:~/Eiffel/eiffel-wrap-c/wrap_libgit2$ ls /usr/local/lib
libgit2.a libgit2.so libgit2.so.0.99 libgit2.so.0.99.0 pkgconfig python2.7 python3.7
Thanks very much for the quick help.
- thomas
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status --porcelain
Intializing Libgit2
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc
M docs/ADL2/master04-cadl.adoc thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git status --porcelain
M docs/ADL2/master04-cadl.adoc
M docs/AOM2/master04-constraint_model_package.adoc
M docs/UML/class_index.adoc
M docs/UML/diagrams/AM-aom2.constraint_model-bottom.svg
M docs/UML/diagrams/AM-aom2.constraint_model.svg
M docs/UML/diagrams/AM-aom2.rules.svg
M docs/UML/diagrams/AM-example-demographics-parties.svg
M docs/UML/diagrams/AM-p_aom2-lower.svg
M docs/index.html
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ ls_remote
Missing command line parameter <remote>
lxs [--git-dir=<directory>]
<remote>thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git ls-remote
From https://github.com/openEHR/specifications-AM.git
a61688a4f9dc7039b923be0894ddb72a43668339 HEAD
7060042e0d0d0a42e0850ae99830f5600346f5b7 refs/heads/Release-2.0.6
a61688a4f9dc7039b923be0894ddb72a43668339 refs/heads/master
2769bdeebdca166d4724228e7c180ebc3d6cbe88 refs/tags/Release-2.0.6
1779fa90862c191a25faea59421ef37d446d880d refs/tags/Release-2.0.6^{}
f589086daf6b20b0e991f829f9b64bc02c3f88aa refs/tags/Release-2.0.6v1
068533c2fe95ad7ee4cc4e78ae5c673dea4f461a refs/tags/Release-2.0.6v1^{}
5c644689075e9b86c4c1649c907ff70da8bd27a1 refs/tags/Release-2.0.6v2
7060042e0d0d0a42e0850ae99830f5600346f5b7 refs/tags/Release-2.0.6v2^{}
git_status --porcelain or
git_status --long
Then with ls_remote.
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ ls_remote
Missing command line parameter <remote>
lxs [--git-dir=<directory>]
<remote>thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git ls-remote
From https://github.com/openEHR/specifications-AM.git
a61688a4f9dc7039b923be0894ddb72a43668339 HEAD
7060042e0d0d0a42e0850ae99830f5600346f5b7 refs/heads/Release-2.0.6
a61688a4f9dc7039b923be0894ddb72a43668339 refs/heads/master
2769bdeebdca166d4724228e7c180ebc3d6cbe88 refs/tags/Release-2.0.6
1779fa90862c191a25faea59421ef37d446d880d refs/tags/Release-2.0.6^{}
f589086daf6b20b0e991f829f9b64bc02c3f88aa refs/tags/Release-2.0.6v1
068533c2fe95ad7ee4cc4e78ae5c673dea4f461a refs/tags/Release-2.0.6v1^{}
5c644689075e9b86c4c1649c907ff70da8bd27a1 refs/tags/Release-2.0.6v2
7060042e0d0d0a42e0850ae99830f5600346f5b7 refs/tags/Release-2.0.6v2^{}
ls_remote
https://github.com/openEHR/specifications-AM.git
- thomas
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
M docs/ADL2/master04-cadl.adoc
M docs/AOM2/master04-constraint_model_package.adoc
M docs/UML/class_index.adoc
M docs/UML/diagrams/AM-aom2.constraint_model-bottom.svg
M docs/UML/diagrams/AM-aom2.constraint_model.svg
M docs/UML/diagrams/AM-aom2.rules.svg
M docs/UML/diagrams/AM-example-demographics-parties.svg
M docs/UML/diagrams/AM-p_aom2-lower.svg
M docs/index.html
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
Could not get status /home/thomas/openEHR-specifications/specifications-AM/.git/
Hi Javier,the behaviour of git_status changes depending on how I build it.If a do a build from scratch and then finalise (from inside Estudio) WITH assertions (whatever is enabled in the .ecf, I didn't change anything), I get a binary that works (except the final line is still missing an LF):
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
M docs/ADL2/master04-cadl.adoc
M docs/AOM2/master04-constraint_model_package.adoc
M docs/UML/class_index.adoc
M docs/UML/diagrams/AM-aom2.constraint_model-bottom.svg
M docs/UML/diagrams/AM-aom2.constraint_model.svg
M docs/UML/diagrams/AM-aom2.rules.svg
M docs/UML/diagrams/AM-example-demographics-parties.svg
M docs/UML/diagrams/AM-p_aom2-lower.svg
M docs/index.html
If I do a clean build and finalise WITHOUT assertions, I get (as usual) a much small binary, that now doesn't work:
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
Could not get status /home/thomas/openEHR-specifications/specifications-AM/.git/I tried a similar finalised build of ls_remote, and it crashed (APPLICATION root creation failed).I suspect that the removal of assertions is removing some unreferenced code that is needed in a callback, and/or only referenced in some pre- or post-condition. I don't have time to figure out what is going wrong, but if you do these two finalise variants you should be able to reproduce the problem. I would expect similar problems with the other tools as well. Most likely easy to fix, but much easier if one knows the architecture of the code!
Since ultimately most users will want to use the wrapper from their own code, they need to know what the general rule/approach is in order to prevent loss of code due to finalisation (assuming that is indeed the problem).hope this gets us a bit further.
- thomas
Hi Thomas,
On Thursday, April 2, 2020 at 8:13:27 AM UTC-3, Thomas Beale wrote:Hi Javier,the behaviour of git_status changes depending on how I build it.If a do a build from scratch and then finalise (from inside Estudio) WITH assertions (whatever is enabled in the .ecf, I didn't change anything), I get a binary that works (except the final line is still missing an LF):
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
M docs/ADL2/master04-cadl.adoc
M docs/AOM2/master04-constraint_model_package.adoc
M docs/UML/class_index.adoc
M docs/UML/diagrams/AM-aom2.constraint_model-bottom.svg
M docs/UML/diagrams/AM-aom2.constraint_model.svg
M docs/UML/diagrams/AM-aom2.rules.svg
M docs/UML/diagrams/AM-example-demographics-parties.svg
M docs/UML/diagrams/AM-p_aom2-lower.svg
M docs/index.html
If I do a clean build and finalise WITHOUT assertions, I get (as usual) a much small binary, that now doesn't work:I've fixed the issue with `git_status`, I will review the other in the comming days.
thomas@Meduse-VB:~/openEHR-specifications/specifications-AM$ git_status
Could not get status /home/thomas/openEHR-specifications/specifications-AM/.git/I tried a similar finalised build of ls_remote, and it crashed (APPLICATION root creation failed).I suspect that the removal of assertions is removing some unreferenced code that is needed in a callback, and/or only referenced in some pre- or post-condition. I don't have time to figure out what is going wrong, but if you do these two finalise variants you should be able to reproduce the problem. I would expect similar problems with the other tools as well. Most likely easy to fix, but much easier if one knows the architecture of the code!I've reproduced the issue with ls_remote on Linux but works fine on Windows, I will check and let you know ASAP.
ls_remote
from the local repository the commad is:ls_remote .
Since ultimately most users will want to use the wrapper from their own code, they need to know what the general rule/approach is in order to prevent loss of code due to finalisation (assuming that is indeed the problem).hope this gets us a bit further.Javier
- thomas