Closed mw66 closed 6 months ago
What C compiler are you using? If it's gcc
, edit the file gcc.cfg and add -I $GOBO/tool/gec/backend/c/runtime
to the cc:
line.
Note these files have been moved recently, so you might need to get the latest version of the code from Github.
on my system, changed to -I$GOBO/tool/gec/runtime/c
compile worked, but
/home/eiffel/workspace/PorterPackage/Eiffel_23.09/library/cURL/Clib/eiffel_curl.c:79: undefined reference to `eif_protect'
/home/eiffel/workspace/PorterPackage/Eiffel_23.09/library/cURL/Clib/eiffel_curl.c:88: undefined reference to `eif_wean'
This is strange, because my sys does not have /home/eiffel
, so it's hard coded somewhere in Eiffel_23.09.
eif_protect
and eif_wean
are coming from the ISE Eiffel runtime. I need to define them as no-op in gec
.
This is strange, because my sys does not have
/home/eiffel
, so it's hard coded somewhere in Eiffel_23.09.
And you did not try to compile eiffel_curl.c
either. This C file is compiled in $ISE_EIFFEL/library/cURL/spec/linux-x86-64/lib/eiffel_curl.o
and the C compiler tries to link it to the executable. So /home/eiffel/workspace/PorterPackage/Eiffel_23.09/library/cURL/Clib/eiffel_curl.c
was probably the location of the C file when someone compiled eiffel_curl.o
at ISE.
With the new version of gec
that I just pushed in the Gobo repository, I was able to compile and run the cURL/sftp example:
ericb@yate:~/ise/Eiffel_23.09/examples/cURL/sftp$ gec sftp.ecf
Degree 6: 0/0/0 0:0:0.076
Degree 5: 0/0/0 0:0:0.453
Degree 4: 0/0/0 0:0:0.084
Degree 3: 0/0/0 0:0:0.137
Degree -2: 0/0/0 0:0:0.247
Degree -3: 0/0/0 0:0:0.197
Degree -4: 0/0/0 0:0:6.225
Total Time: 0/0/0 0:0:7.425
ericb@yate:~/ise/Eiffel_23.09/examples/cURL/sftp$ ./sftp
Eiffel cURL simple sftp.
* Trying 194.108.117.16:22...
* TCP_NODELAY set
* Connected to test.rebex.net (194.108.117.16) port 22 (#0)
* User: demo
* Authentication using SSH public key file
* completed keyboard interactive authentication
* Authentication complete
* Connection #0 to host test.rebex.net left intact
Let me know if it works for you as well, so that we can close this issue.
Also:
What C compiler are you using? If it's gcc, edit the file gcc.cfg and add -I $GOBO/tool/gec/backend/c/runtime to the cc: line.
This is not needed anymore, gec
will now add this include path automatically if needed.
Confirmed working. Closing.
I'm building:
Any flag I need to pass in?