The remark on the external mode patch was perhaps misleading. To test
this I used the official versions of the mercurial repos and not the
patched version.

When comparing the output of `make VERBOSE=1 clean all`, it becomes
obvious that the argument "-lethercat" is missing to the g++ command in
R2019a.
Previous to that, in R2018b I have as part of the line
> -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align
> -Wstrict-prototypes -Wnested-externs  -Wno-long-long
> "/usr/local/share/etherlab/src/ecrt_support.c"
and in R2019a I have for the corresponding part just
> /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/blocks/EtherCAT/ecrt_support.c.
The compiler resolves my symbolic link for saving space in my root
directory:
> $ ll /usr/local/MATLAB
> lrwxrwxrwx 1 root root 27 Jun 24  2017 /usr/local/MATLAB ->
> /mnt/FP500/usr/local/MATLAB/
So the file seems to be searched in the wrong place (matlab directory).
The full log is attached.
I am not sure if the missing "-lethercat" is related or a different
issue. When manually adding the "lethercat" to the command in the
terminal, the error remains.
The library can be found:
> $ ld -lethercat --verbose
> [...]
>     found ld-linux-x86-64.so.2 at
> //lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
>     ld: warning: cannot find entry symbol _start; not setting start
> address
I currently have no access on a different machine for testing, so I
don't want to waste your time with what could be a problem specific to
my computer setup unaware to me.
I am currently on Ubuntu 18.04 (upgraded from 16.04). If someone else
could report the same error or show that it works, it could already help
a lot.

Thanks already


On 06.04.20 17:19, Richard Hacker wrote:
> The file 'ecrt_support.c' in $MATLABDIR should be empty. It shouldn't
> even be there, but matlab complains that this file is missing, thus
> the 0Byte file.
>
> The generated Makefile from etherlab_hrt.tmf, however, ensures that
> the (non-empty) source file is found in $INSTALLDIR/src/ecrt_support.c
> before $MATLABDIR/rtw/c/etherlab/src. (It could probably better have
> been a link from $MATLABDIR to $INSTALLDIR)
>
> You seem to be applying patches to use matlab's external mode and your
> problem could be found there.
>
> Try
> make VERBOSE=1 clean all
> in the generated directory to find out where ecrt_support.c is found.
>
>
> On 2020-04-06 16:57, Moritz Schappler wrote:
>> Hello Richard,
>>
>> thanks for the quick reply. The output of `nm ecrt_support.o` showed a
>> potential reason: It is empty and the underlying file
>> rtw/blocks/EtherCAT/ecrt_support.c in the Matlab directory is also empty
>> (0 bytes).
>> It seems, as if the file should be used from
>> /usr/local/share/etherlab/src with 44kB, but Matlab takes the wrong
>> file. Matlab R2018b also has the empty file, but seems to not take it.
>> I installed Etherlab for both R2018b and R2019a in the same way, using
>> install.sh and setup_etherlab.m:
>> https://github.com/SchapplM/etherlab-examples/blob/master/SETUP_ETHERCAT.MD#entwpc
>>
>> Perhaps setting up the directories for linking the Simulink project has
>> changed in R2019a, or I messed up the Matlab path without having
>> noticed.
>> I re-tested on a different machine this time, though.
>>
>> This duplicate 0B-file was already introduced in hg-commit 1146
>> (2018-02-08).
>> When I overwrite the 0B file with the full version in the Matlab dir, I
>> get similar errors. Instead of
>>>      new_2019a.o: In Funktion »new_2019a_step«:
>>>      new_2019a.c:(.text+0x15): Warnung: undefinierter Verweis auf
>>> »ecs_receive«
>> I get something like
>>>      ecrt_support.o: In Funktion »ecs_receive«:
>>>      ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf
>>> »ecrt_domain_process«
>> The output of  nm ecrt_support.o` now gives for R2018b and R2019a
>>>                   U calloc
>>>                   U clock_gettime
>>>                  [...]
>>>                   U ecrt_domain_data
>>>                  [...]
>> So the symbols are undefined ("U") also in the previous version R2018b.
>> Is it possible that the linker/compiler since R2019a is "stricter" and
>> now raises an error for the undefined references?
>>
>> As for manually running the g++ command: Building fails with the same
>> error in R2019a and R2018b.
>> Therefore the path configuration only seems to work from within Matlab
>> (R2018b).
>> Up to now, the only manual adaptation to making the build process work
>> was symbolically linking the shared libraries in /usr/local/lib/ with
>>> $ ll /usr/local/lib/
>>> lrwxrwxrwx  1 root root    44 Apr  6 14:54 libethercat.so ->
>>> /usr/local/share/etherlab/lib/libethercat.so*
>>> lrwxrwxrwx  1 root root    42 Apr  6 14:56 libpdserv.so ->
>>> /usr/local/share/etherlab/lib/libpdserv.so
>> I attached the detailed logs.
>>
>> In matlab-mex of the setup_etherlab.m I got the warnings
>>> Warning: You are using gcc version '7.5.0'. The version of gcc is not
>>> supported. The
>>> version currently supported with MEX is '6.3.x'. For a list of
>>> currently supported
>>> compilers see:
>>> https://www.mathworks.com/support/compilers/current_release.
>> which could also be related to handling of warnings/errors, but did not
>> pose a problem in R2018b for instance.
>>
>> Thanks already for looking into this.
>>
>> Viele Grüße
>> Moritz Schappler
>>
>>
>> On 06.04.20 13:18, Richard Hacker wrote:
>>> Hi Moritz
>>>
>>> I do not have Matlab > 2017 available to test, but I do not see a
>>> reason that ecs_*() symbols are not be found. They are defined in
>>> ecrt_support.c which is compiled and linked.
>>>
>>> Please go into the directory and supply me with the output of:
>>> cd /home/schappler/IMES/REPO/ethercat/etherlab-slaves/ixxa
>>> /new_2019a_etl_hrt
>>> nm ecrt_support.o
>>>
>>> Maybe try to compile the executable with (I just moved new_2019a.o
>>> forward):
>>> g++ -o ../new_2019a new_2019a_capi.o new_2019a.o new_2019a_data.o
>>> new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o
>>> hrt_main.o -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
>>>
>>> Mit freundlichem Gruß
>>>
>>> Richard Hacker
>>>
>>

-- 
__________________________________________________________
M. Sc. Moritz Schappler
Wissenschaftlicher Mitarbeiter und Gruppenleiter
Robotik & autonome Systeme

Gottfried Wilhelm Leibniz Universität Hannover
Institut für Mechatronische Systeme
An der Universität 1, Gebäude 8142 (Etage 1, Raum 108)
30823 Garbsen

Fon: +49 (0)511 762-4116
Fax: +49 (0)511 762-19976

$ cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/2018b/new_2018b_etl_hrt
$ make VERBOSE=1 clean all
### Deleting the objects and ../new_2018b
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2018b_capi.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2018b_data.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2018b_header.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rtGetInf.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rtGetNaN.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rt_nonfinite.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "/usr/local/share/etherlab/src/ecrt_support.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2018b.c"
gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2018b -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2018b_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2018b/extern/include -I/mnt/FP500/usr/local/MATLAB/R2018b/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2018b/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "/usr/local/share/etherlab/src/hrt_main.c"
g++      -o ../new_2018b new_2018b_capi.o new_2018b_data.o new_2018b_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2018b.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread -lethercat
### Created executable: ../new_2018b

# Try 1: Make Clean in Terminal

    $ cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/2019a/new_2019a_etl_hrt
    $ make VERBOSE=1 clean all
    ### Deleting the objects and ../new_2019a
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2019a_capi.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2019a_data.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2019a_header.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rtGetInf.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rtGetNaN.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "rt_nonfinite.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/blocks/EtherCAT/ecrt_support.c
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "new_2019a.c"
    gcc -c  -O2   -DUSE_RTMODEL  -DMODEL=new_2019a -DRT -DNUMST=1 -DTID01EQ=0 -DNCSTATES=0 -DUNIX -DMT=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DOVERRUNMAX=1 -DBUFFER_TIME=2 -DSTACKSIZE=2000 -DPARAMETER_PREFIX="ModelParameter" -I. -I.. -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab -I/mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/new_2019a_etl_hrt -I/mnt/FP500/usr/local/MATLAB/R2019a/extern/include -I/mnt/FP500/usr/local/MATLAB/R2019a/simulink/include -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src -I/mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/src/ext_mode/common       -I/usr/local/share/etherlab/include -I/usr/local/include  -Wall -W -Wwrite-strings -Winline -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs  -Wno-long-long "/usr/local/share/etherlab/src/hrt_main.c"
    g++      -o ../new_2019a new_2019a_capi.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2019a.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
    ecrt_support.o: In Funktion »get_master«:
    ecrt_support.c:(.text+0x499): Warnung: undefinierter Verweis auf »ecrt_request_master«
    ecrt_support.o: In Funktion »get_domain«:
    ecrt_support.c:(.text+0x5e5): Warnung: undefinierter Verweis auf »ecrt_master_create_domain«
    ecrt_support.o: In Funktion »register_pdos«:
    ecrt_support.c:(.text+0x6d9): Warnung: undefinierter Verweis auf »ecrt_slave_config_reg_pdo_entry«
    ecrt_support.o: In Funktion »ecs_receive«:
    ecrt_support.c:(.text+0xa0b): Warnung: undefinierter Verweis auf »ecrt_domain_process«
    ecrt_support.c:(.text+0xa18): Warnung: undefinierter Verweis auf »ecrt_domain_state«
    ecrt_support.c:(.text+0xa7c): Warnung: undefinierter Verweis auf »ecrt_master_application_time«
    ecrt_support.c:(.text+0xa86): Warnung: undefinierter Verweis auf »ecrt_master_receive«
    ecrt_support.c:(.text+0xa95): Warnung: undefinierter Verweis auf »ecrt_master_state«
    ecrt_support.o: In Funktion »ecs_send«:
    ecrt_support.c:(.text+0xb05): Warnung: undefinierter Verweis auf »ecrt_domain_queue«
    ecrt_support.c:(.text+0xb7a): Warnung: undefinierter Verweis auf »ecrt_master_sync_slave_clocks«
    ecrt_support.c:(.text+0xb84): Warnung: undefinierter Verweis auf »ecrt_master_send«
    ecrt_support.c:(.text+0xbd8): Warnung: undefinierter Verweis auf »ecrt_master_sync_reference_clock_to«
    ecrt_support.o: In Funktion »ecs_start_slaves«:
    ecrt_support.c:(.text+0xcf0): Warnung: undefinierter Verweis auf »ecrt_master_slave_config«
    ecrt_support.c:(.text+0xd0d): Warnung: undefinierter Verweis auf »ecrt_slave_config_pdos«
    ecrt_support.c:(.text+0xde5): Warnung: undefinierter Verweis auf »ecrt_master_activate«
    ecrt_support.c:(.text+0xe05): Warnung: undefinierter Verweis auf »ecrt_domain_data«
    ecrt_support.c:(.text+0x108c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
    ecrt_support.c:(.text+0x10fe): Warnung: undefinierter Verweis auf »ecrt_slave_config_complete_sdo«
    ecrt_support.c:(.text+0x119c): Warnung: undefinierter Verweis auf »ecrt_slave_config_sdo«
    ecrt_support.c:(.text+0x123b): Warnung: undefinierter Verweis auf »ecrt_write_lreal«
    ecrt_support.c:(.text+0x1307): Warnung: undefinierter Verweis auf »ecrt_slave_config_create_sdo_request«
    ecrt_support.c:(.text+0x1364): Warnung: undefinierter Verweis auf »ecrt_slave_config_idn«
    ecrt_support.c:(.text+0x13c7): Warnung: undefinierter Verweis auf »ecrt_write_real«
    ecrt_support.c:(.text+0x14b3): Warnung: undefinierter Verweis auf »ecrt_slave_config_dc«
    collect2: error: ld returned 1 exit status
    Makefile:299: recipe for target '../new_2019a' failed
    make: *** [../new_2019a] Error 1

# Try 2: Clean Re-Build in Simulink

    ### Generating code into build folder: /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/2019a_v2/new_2019a_etl_hrt
    Input port 4 of 'new_2019a/ETCio 100' is not connected. [3 similar]
    Component:Simulink | Category:Block warning
    Source 'new_2019a/Pulse Generator' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.
    Component:Simulink | Category:Block warning
    ### Invoking Target Language Compiler on new_2019a.rtw
    ### Using System Target File: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab.tlc
    ### Loading TLC function libraries
    ### Initial pass through model to cache user defined code
    ### Caching model source code
    ### Generating TLC interface API.
    ### Writing source file new_2019a_capi.c
    ### Writing header file new_2019a_capi.h
    ### Writing header file new_2019a_types.h
    .
    ### Writing source file new_2019a.c
    ### Writing header file new_2019a.h
    ### Writing header file rtwtypes.h
    ### Writing header file builtin_typeid_types.h
    ### Writing header file multiword_types.h
    ### Writing header file rt_nonfinite.h
    .
    ### Writing source file rt_nonfinite.c
    ### Writing header file rtGetInf.h
    ### Writing source file rtGetInf.c
    ### Writing header file rtGetNaN.h
    ### Writing source file rtGetNaN.c
    ### Writing header file new_2019a_private.h
    .
    ### Writing header file rtmodel.h
    ### Writing source file new_2019a_data.c
    ### TLC code generation complete.
    .
    ### Processing Template Makefile: /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf
    Found legacy make variables |>START_MDLREFINC_EXPAND_INCLUDES<|, |>END_MDLREFINC_EXPAND_INCLUDES<|, |>MODELREF_INC_PATH<| in the template makefile /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf. The variables are no longer required. You can remove the variables. [3 similar]
    Component:Simulink | Category:Model warning
    ### Creating /mnt/FP500/IMES/REPO/ethercat/etherlab-examples/build_test_officialetherlab/2019a_v2/new_2019a_etl_hrt/new_2019a.mk from /mnt/FP500/usr/local/MATLAB/R2019a/rtw/c/etherlab/etherlab_hrt.tmf
    ### Building new_2019a: /mnt/FP500/usr/local/MATLAB/R2019a/bin/glnxa64/gmake -f new_2019a.mk  INCLUDE_MDL_TERMINATE_FCN=1 ISPROTECTINGMODEL=NOTPROTECTING
    ln -s new_2019a.mk Makefile
	    CC  new_2019a_capi.o
	    CC  new_2019a_data.o
	    CC  new_2019a_header.o
	    CC  rtGetInf.o
	    CC  rtGetNaN.o
	    CC  rt_nonfinite.o
	    CC  ecrt_support.o
	    CC  new_2019a.o
	    CC  hrt_main.o
    g++      -o ../new_2019a new_2019a_capi.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2019a.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread
    new_2019a.o: In Funktion »new_2019a_step«:
    new_2019a.c:(.text+0x15): Warnung: undefinierter Verweis auf »ecs_receive«
    new_2019a.o: In Funktion »new_2019a_initialize«:
    new_2019a.c:(.text+0x3ab): Warnung: undefinierter Verweis auf »ecs_init«
    new_2019a.c:(.text+0x408): Warnung: undefinierter Verweis auf »ecs_start_slaves«
    new_2019a.o: In Funktion »new_2019a_step«:
    new_2019a.c:(.text+0x224): Warnung: undefinierter Verweis auf »ecs_send«
    new_2019a.o: In Funktion »new_2019a_terminate«:
    new_2019a.c:(.text+0x446): Warnung: undefinierter Verweis auf »ecs_end«
    collect2: error: ld returned 1 exit status
    gmake: *** [../new_2019a] Error 1

# Try 3: Build in Terminal

lethercat was missing in command?

$ cd /home/moritz/IMES_REPO/ethercat/etherlab-examples/build_test_officialetherlab/2019a_v2/new_2019a_etl_hrt
$ g++      -o ../new_2019a new_2019a_capi.o new_2019a_data.o new_2019a_header.o rtGetInf.o rtGetNaN.o rt_nonfinite.o ecrt_support.o new_2019a.o hrt_main.o          -L/usr/local/lib  -lm -lpdserv -ldl -lrt -pthread -lethercat
new_2019a.o: In Funktion »new_2019a_step«:
new_2019a.c:(.text+0x15): Warnung: undefinierter Verweis auf »ecs_receive«
new_2019a.o: In Funktion »new_2019a_initialize«:
new_2019a.c:(.text+0x3ab): Warnung: undefinierter Verweis auf »ecs_init«
new_2019a.c:(.text+0x408): Warnung: undefinierter Verweis auf »ecs_start_slaves«
new_2019a.o: In Funktion »new_2019a_step«:
new_2019a.c:(.text+0x224): Warnung: undefinierter Verweis auf »ecs_send«
new_2019a.o: In Funktion »new_2019a_terminate«:
new_2019a.c:(.text+0x446): Warnung: undefinierter Verweis auf »ecs_end«
collect2: error: ld returned 1 exit status



Debug ethercat library for linker:

    $ ld -lethercat --verbose
    GNU ld (GNU Binutils for Ubuntu) 2.30
      Unterstützte Emulationen:
       elf_x86_64
       elf32_x86_64
       elf_i386
       elf_iamcu
       i386linux
       elf_l1om
       elf_k1om
       i386pep
       i386pe
    Internes Linker-Skript wird verwendet:
    ==================================================
    /* Script for -z combreloc: combine and sort reloc sections */
    /* Copyright (C) 2014-2018 Free Software Foundation, Inc.
       Copying and distribution of this script, with or without modification,
       are permitted in any medium without royalty provided the copyright
       notice and this notice are preserved.  */
    OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
	          "elf64-x86-64")
    OUTPUT_ARCH(i386:x86-64)
    ENTRY(_start)
    SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib");
    SECTIONS
    {
      /* Read-only sections, merged into text segment: */
      PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000)); . = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
      .interp         : { *(.interp) }
      .note.gnu.build-id : { *(.note.gnu.build-id) }
      .hash           : { *(.hash) }
      .gnu.hash       : { *(.gnu.hash) }
      .dynsym         : { *(.dynsym) }
      .dynstr         : { *(.dynstr) }
      .gnu.version    : { *(.gnu.version) }
      .gnu.version_d  : { *(.gnu.version_d) }
      .gnu.version_r  : { *(.gnu.version_r) }
      .rela.dyn       :
        {
          *(.rela.init)
          *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
          *(.rela.fini)
          *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
          *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
          *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
          *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
          *(.rela.ctors)
          *(.rela.dtors)
          *(.rela.got)
          *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
          *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
          *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
          *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
          *(.rela.ifunc)
        }
      .rela.plt       :
        {
          *(.rela.plt)
          PROVIDE_HIDDEN (__rela_iplt_start = .);
          *(.rela.iplt)
          PROVIDE_HIDDEN (__rela_iplt_end = .);
        }
      .init           :
      {
        KEEP (*(SORT_NONE(.init)))
      }
      .plt            : { *(.plt) *(.iplt) }
    .plt.got        : { *(.plt.got) }
    .plt.sec        : { *(.plt.sec) }
      .text           :
      {
        *(.text.unlikely .text.*_unlikely .text.unlikely.*)
        *(.text.exit .text.exit.*)
        *(.text.startup .text.startup.*)
        *(.text.hot .text.hot.*)
        *(.text .stub .text.* .gnu.linkonce.t.*)
        /* .gnu.warning sections are handled specially by elf32.em.  */
        *(.gnu.warning)
      }
      .fini           :
      {
        KEEP (*(SORT_NONE(.fini)))
      }
      PROVIDE (__etext = .);
      PROVIDE (_etext = .);
      PROVIDE (etext = .);
      .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
      .rodata1        : { *(.rodata1) }
      .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
      .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
      .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
      .gcc_except_table.*) }
      .gnu_extab   : ONLY_IF_RO { *(.gnu_extab*) }
      /* These sections are generated by the Sun/Oracle C++ compiler.  */
      .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
      .exception_ranges*) }
      /* Adjust the address for the data segment.  We want to adjust up to
         the same address within the page on the next page up.  */
      . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
      /* Exception handling  */
      .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
      .gnu_extab      : ONLY_IF_RW { *(.gnu_extab) }
      .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
      .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
      /* Thread Local Storage sections  */
      .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
      .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
      .preinit_array     :
      {
        PROVIDE_HIDDEN (__preinit_array_start = .);
        KEEP (*(.preinit_array))
        PROVIDE_HIDDEN (__preinit_array_end = .);
      }
      .init_array     :
      {
        PROVIDE_HIDDEN (__init_array_start = .);
        KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
        KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
        PROVIDE_HIDDEN (__init_array_end = .);
      }
      .fini_array     :
      {
        PROVIDE_HIDDEN (__fini_array_start = .);
        KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
        KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
        PROVIDE_HIDDEN (__fini_array_end = .);
      }
      .ctors          :
      {
        /* gcc uses crtbegin.o to find the start of
           the constructors, so we make sure it is
           first.  Because this is a wildcard, it
           doesn't matter if the user does not
           actually link against crtbegin.o; the
           linker won't look for a file to match a
           wildcard.  The wildcard also means that it
           doesn't matter which directory crtbegin.o
           is in.  */
        KEEP (*crtbegin.o(.ctors))
        KEEP (*crtbegin?.o(.ctors))
        /* We don't want to include the .ctor section from
           the crtend.o file until after the sorted ctors.
           The .ctor section from the crtend file contains the
           end of ctors marker and it must be last */
        KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
        KEEP (*(SORT(.ctors.*)))
        KEEP (*(.ctors))
      }
      .dtors          :
      {
        KEEP (*crtbegin.o(.dtors))
        KEEP (*crtbegin?.o(.dtors))
        KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
        KEEP (*(SORT(.dtors.*)))
        KEEP (*(.dtors))
      }
      .jcr            : { KEEP (*(.jcr)) }
      .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
      .dynamic        : { *(.dynamic) }
      .got            : { *(.got) *(.igot) }
      . = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 ? 24 : 0, .);
      .got.plt        : { *(.got.plt)  *(.igot.plt) }
      .data           :
      {
        *(.data .data.* .gnu.linkonce.d.*)
        SORT(CONSTRUCTORS)
      }
      .data1          : { *(.data1) }
      _edata = .; PROVIDE (edata = .);
      . = .;
      __bss_start = .;
      .bss            :
      {
       *(.dynbss)
       *(.bss .bss.* .gnu.linkonce.b.*)
       *(COMMON)
       /* Align here to ensure that the .bss section occupies space up to
          _end.  Align after .bss to ensure correct alignment even if the
          .bss section disappears because there are no input sections.
          FIXME: Why do we need it? When there is no .bss section, we don't
          pad the .data section.  */
       . = ALIGN(. != 0 ? 64 / 8 : 1);
      }
      .lbss   :
      {
        *(.dynlbss)
        *(.lbss .lbss.* .gnu.linkonce.lb.*)
        *(LARGE_COMMON)
      }
      . = ALIGN(64 / 8);
      . = SEGMENT_START("ldata-segment", .);
      .lrodata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
      {
        *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
      }
      .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
      {
        *(.ldata .ldata.* .gnu.linkonce.l.*)
        . = ALIGN(. != 0 ? 64 / 8 : 1);
      }
      . = ALIGN(64 / 8);
      _end = .; PROVIDE (end = .);
      . = DATA_SEGMENT_END (.);
      /* Stabs debugging sections.  */
      .stab          0 : { *(.stab) }
      .stabstr       0 : { *(.stabstr) }
      .stab.excl     0 : { *(.stab.excl) }
      .stab.exclstr  0 : { *(.stab.exclstr) }
      .stab.index    0 : { *(.stab.index) }
      .stab.indexstr 0 : { *(.stab.indexstr) }
      .comment       0 : { *(.comment) }
      /* DWARF debug sections.
         Symbols in the DWARF debugging sections are relative to the beginning
         of the section so we begin them at 0.  */
      /* DWARF 1 */
      .debug          0 : { *(.debug) }
      .line           0 : { *(.line) }
      /* GNU DWARF 1 extensions */
      .debug_srcinfo  0 : { *(.debug_srcinfo) }
      .debug_sfnames  0 : { *(.debug_sfnames) }
      /* DWARF 1.1 and DWARF 2 */
      .debug_aranges  0 : { *(.debug_aranges) }
      .debug_pubnames 0 : { *(.debug_pubnames) }
      /* DWARF 2 */
      .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
      .debug_abbrev   0 : { *(.debug_abbrev) }
      .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end ) }
      .debug_frame    0 : { *(.debug_frame) }
      .debug_str      0 : { *(.debug_str) }
      .debug_loc      0 : { *(.debug_loc) }
      .debug_macinfo  0 : { *(.debug_macinfo) }
      /* SGI/MIPS DWARF 2 extensions */
      .debug_weaknames 0 : { *(.debug_weaknames) }
      .debug_funcnames 0 : { *(.debug_funcnames) }
      .debug_typenames 0 : { *(.debug_typenames) }
      .debug_varnames  0 : { *(.debug_varnames) }
      /* DWARF 3 */
      .debug_pubtypes 0 : { *(.debug_pubtypes) }
      .debug_ranges   0 : { *(.debug_ranges) }
      /* DWARF Extension.  */
      .debug_macro    0 : { *(.debug_macro) }
      .debug_addr     0 : { *(.debug_addr) }
      .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
      /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
    }


    ==================================================
    Öffnen von //usr/local/lib/x86_64-linux-gnu/libethercat.so ist fehlgeschlagen
    Öffnen von //usr/local/lib/x86_64-linux-gnu/libethercat.a ist fehlgeschlagen
    Öffnen von //lib/x86_64-linux-gnu/libethercat.so ist fehlgeschlagen
    Öffnen von //lib/x86_64-linux-gnu/libethercat.a ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu/libethercat.so ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu/libethercat.a ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu64/libethercat.so ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu64/libethercat.a ist fehlgeschlagen
    Öffnen von //usr/local/lib64/libethercat.so ist fehlgeschlagen
    Öffnen von //usr/local/lib64/libethercat.a ist fehlgeschlagen
    Öffnen von //lib64/libethercat.so ist fehlgeschlagen
    Öffnen von //lib64/libethercat.a ist fehlgeschlagen
    Öffnen von //usr/lib64/libethercat.so ist fehlgeschlagen
    Öffnen von //usr/lib64/libethercat.a ist fehlgeschlagen
    Öffnen von //usr/local/lib/libethercat.so war erfolgreich
    -lethercat (//usr/local/lib/libethercat.so)
    libc.so.6 needed by //usr/local/lib/libethercat.so
    Öffnen von //usr/lib/x86_64-linux-gnu/libfakeroot/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i386-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/i386-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/x86_64-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib32/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/libx32/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/x86_64-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu64/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib64/libc.so.6 ist fehlgeschlagen
    Öffnen von //lib64/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib64/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/x86_64-linux-gnu/lib64/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/x86_64-linux-gnu/lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/x86_64-linux-gnu/libfakeroot/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i386-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/i386-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/lib/i686-linux-gnu/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/libc.so.6 ist fehlgeschlagen
    Öffnen von //usr/local/lib/x86_64-linux-gnu/libc.so.6 ist fehlgeschlagen
    found libc.so.6 at //lib/x86_64-linux-gnu/libc.so.6
    ld-linux-x86-64.so.2 needed by //lib/x86_64-linux-gnu/libc.so.6
    Öffnen von //usr/lib/x86_64-linux-gnu/libfakeroot/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i386-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //lib/i386-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/lib/i386-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/local/lib/i686-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //lib/i686-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/lib/i686-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/local/lib/ld-linux-x86-64.so.2 ist fehlgeschlagen
    Öffnen von //usr/local/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ist fehlgeschlagen
    found ld-linux-x86-64.so.2 at //lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
    ld: warning: cannot find entry symbol _start; not setting start address

$ find /lib*/ -name "libc.so.6"
/lib/i386-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6
/lib32/libc.so.6
/libx32/libc.so.6

_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to