8 Replies Latest reply on Nov 28, 2011 3:29 PM by tedk

    openssl libraries for the SCC cores

    viveks

      Hi,

       

      I am trying to compile a program that uses the openssl library's DES for an experiment to run on the cores. I am not able to get the program to compile. The problem is pasted below. Could anyone please tell me how to fix this compilation? Thanks in advance.

       

       

       

      vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ icc -static -mcpu=pentium -I /usr/include -L /usr/lib32 -lcrypt -gcc-version=340 try.c
      /tmp/iccTeiqQ3.o(.text+0x94): In function `main':
      : undefined reference to `DES_random_key'
      /tmp/iccTeiqQ3.o(.text+0x9e): In function `main':
      : undefined reference to `DES_set_odd_parity'
      /tmp/iccTeiqQ3.o(.text+0xad): In function `main':
      : undefined reference to `DES_set_key_checked'
      /tmp/iccTeiqQ3.o(.text+0xef): In function `main':
      : undefined reference to `DES_ecb_encrypt'
      /tmp/iccTeiqQ3.o(.text+0x147): In function `main':
      : undefined reference to `DES_ecb_encrypt'
      /tmp/iccTeiqQ3.o(.text+0x1be): In function `main':
      : undefined reference to `DES_ecb_encrypt'
      /tmp/iccTeiqQ3.o(.text+0x213): In function `main':
      : undefined reference to `DES_ecb_encrypt'
      /usr/lib32/libc.a(elf-init.o)(.text+0xe5): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_end'
      /usr/lib32/libc.a(elf-init.o)(.text+0xec): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_start'
      /usr/lib32/libc.a(elf-init.o)(.text+0xfd): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_start'
      /usr/lib32/libc.a(elf-init.o)(.text+0x106): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_start'
      /usr/lib32/libc.a(elf-init.o)(.text+0x113): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_start'
      /usr/lib32/libc.a(elf-init.o)(.text+0x11b): In function `__libc_csu_irel':
      : undefined reference to `__rel_iplt_start'
        • 1. Re: openssl libraries for the SCC cores
          tedk

          I think the routines you are not finding are in crypto and not crypt. I grabbed your try.c and was able to build for the MCPC (not for SCC) as follows. And it runs (on the MCPC).

          tekubasx@marc026:~/sandbox/rcce/apps/DES$ gcc -lcrypto try.c
          tekubasx@marc026:~/sandbox/rcce/apps/DES$

           

          If when building for the MCPC I link with crypt I get linking errors as you get when you compile for the SCC.

          tekubasx@marc026:~/sandbox/rcce/apps/DES$ gcc -lcrypt try.c
          /tmp/ccySxFY9.o: In function `main':
          try.c:(.text+0xce): undefined reference to `DES_random_key'
          try.c:(.text+0xda): undefined reference to `DES_set_odd_parity'
          try.c:(.text+0xf0): undefined reference to `DES_set_key_checked'
          try.c:(.text+0x144): undefined reference to `DES_ecb_encrypt'
          try.c:(.text+0x1ad): undefined reference to `DES_ecb_encrypt'
          try.c:(.text+0x243): undefined reference to `DES_ecb_encrypt'
          try.c:(.text+0x2ac): undefined reference to `DES_ecb_encrypt'
          collect2: ld returned 1 exit status
          tekubasx@marc026:~/sandbox/rcce/apps/DES$

          The trouble is that I don't see a crypto under the cross compiler tree. Or in /usr/lib32. And I'm not sure how to deal with that. There is a shared crypto under /usr/lib on the core itself called libcrypto.so.1.0.0. I copied that to /usr/lib32 and then linked libcrypto.so to it. But then get the following error.

          tekubasx@marc026:~/sandbox/rcce/apps/DES$ gcc -march=pentium -mtune=pentium -I /usr/include  -L /usr/lib32 -lcrypto try.c
          /opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/bin/../lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE'
          /opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/bin/../lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
          collect2: ld returned 1 exit status
          tekubasx@marc026:~/sandbox/rcce/apps/DES$

           

          I don't see why we shouldn't be able to build and run your simple DES example. I think we are just missing some libraries or the right library version. I'll get some advice from one of our compiler people. In the meantime if anyone figures out what the issue is, don't keep it a secret.

          • 2. Re: openssl libraries for the SCC cores
            viveks

            Ted,

             

            I am still not able to compile the test program. I still get the same errors.

             

            vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ gcc -lcrypto try.c
            try.c:4:24: openssl/des.h: No such file or directory
            try.c: In function `main':
            try.c:16: error: `DES_cblock' undeclared (first use in this function)
            try.c:16: error: (Each undeclared identifier is reported only once
            try.c:16: error: for each function it appears in.)
            try.c:16: error: syntax error before "the_key"
            try.c:17: error: `DES_key_schedule' undeclared (first use in this function)
            try.c:26: error: `the_key' undeclared (first use in this function)
            try.c:29: error: `the_schedule' undeclared (first use in this function)
            try.c:33: error: `p_text' undeclared (first use in this function)
            try.c:35: error: `c_text' undeclared (first use in this function)
            try.c:35: error: `DES_ENCRYPT' undeclared (first use in this function)
            try.c:51: error: `DES_DECRYPT' undeclared (first use in this function)
            vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ which gcc
            /opt/i386-unknown-linux-gnu/bin/gcc
            vivek@marc026:~/rcce_target/latest/rcce/apps/DES$
            If i use the /usr/bin/gcc I still get errors but they are even more "involved" (?)
            vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ /usr/bin/gcc -lcrypto try.c
            /tmp/ccTtGfz4.s: Assembler messages:
            /tmp/ccTtGfz4.s:24: Error: suffix or operands invalid for `push'
            /tmp/ccTtGfz4.s:26: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:29: Error: suffix or operands invalid for `push'
            /tmp/ccTtGfz4.s:31: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:32: Error: `-24(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:37: Error: `-80(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:38: Error: `-80(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:41: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:45: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:46: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:49: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:53: Error: `-96(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:54: Error: `-96(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:57: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:60: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:64: Error: `-80(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:65: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:66: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:73: Error: `-32(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:74: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:76: Error: `-32(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:77: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:79: Error: `-224(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:80: Error: `-32(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:81: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:82: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:84: Error: `-68(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:85: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:88: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:90: Error: `-80(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:91: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:93: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:94: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:96: Error: `-224(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:97: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:98: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:100: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:101: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:103: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:104: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:106: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:107: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:109: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:112: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:114: Error: `-80(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:115: Error: `8(%rax)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:116: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:118: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:119: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:121: Error: `-224(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:122: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:123: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:125: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:126: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:128: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:129: Error: `8(%rax)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:130: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:132: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:133: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:138: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:139: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:140: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:145: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:148: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:150: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:151: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:153: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:154: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:156: Error: `-224(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:157: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:158: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:160: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:161: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:163: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:164: Error: `-96(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:166: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:167: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:169: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:172: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:174: Error: `-88(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:175: Error: `8(%rax)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:176: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:178: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:179: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:181: Error: `-224(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:182: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:183: Error: `-64(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:185: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:186: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:188: Error: `-96(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:189: Error: `8(%rax)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:190: Error: `-48(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:192: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:193: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:198: Error: `-96(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:199: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:200: Error: suffix or operands invalid for `movq'
            /tmp/ccTtGfz4.s:204: Error: `-24(%rbp)' is not a valid 32 bit base/index expression
            /tmp/ccTtGfz4.s:210: Error: suffix or operands invalid for `pop'
            vivek@marc026:~/rcce_target/latest/rcce/apps/DES$
            Am I messing up some paths etc completely? I tried the above thing with -L set to /usr/lib64 etc, but still no go.
            cheers,
            vivek
            • 3. Re: openssl libraries for the SCC cores
              tedk

              Sorry, my last comment was misleading. Yes, I believe you cannot build this example for the SCC. Neither can I. What I did do was try building it for the MCPC (just as a test) and was able to. When I built for the MCPC, I used the gcc that is not the cross compiler. This is

              tekubasx@marc101:~/sccLinux_912/sccLinux/buildroot-2011.05$ which gcc
              /usr/bin/gcc
              tekubasx@marc101:~/sccLinux_912/sccLinux/buildroot-2011.05$ gcc --version
              gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
              Copyright (C) 2009 Free Software Foundation, Inc.
              This is free software; see the source for copying conditions.  There is NO
              warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

              tekubasx@marc101:~/sccLinux_912/sccLinux/buildroot-2011.05$

              And the only reason I did that was to see if I could build your try.c when the SCC is out of the picture. And I can. So your try.c is fine. The problem is with the C cross compiler for SCC. It compiles your try.c but does not link it. I did discover that for the MCPC I needed to link with -lcrypto and not -lcrypt. And I don't know the differences between those libraries.

               

              So I looked for a crypto library that I might use with the cross compiler. I did find a libcrypto.so under /usr/lib on the SCC. It's linked as follows

               

              rck00:lib # ls -l libcrypto.so
              lrwxrwxrwx    1 root     root            18 Aug  8  2011 libcrypto.so -> libcrypto.so.1.0.0*
              rck00:lib #

               

              I then copied that libcrypto.so.1.0.0 to /usr/lib32 on the MCPC and made a link to it as follows.

              libcrypto.so -> libcrypto.so.1.0.0

               

              I still cannot link your try.c, but I get a differenterror message ...

              tekubasx@marc026:~/sandbox/rcce/apps/DES$ gcc -march=pentium -mtune=pentium -I /usr/include -L /usr/lib32 -lcrypto try.c
              /opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/bin/../lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE'
              /opt/i386-unknown-linux-gnu/i386-unknown-linux-gnu/bin/../lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
              collect2: ld returned 1 exit status
              tekubasx@marc026:~/sandbox/rcce/apps/DES$

               

              I don't think you are doing anything wrong. I think you should be able to build your try.c, but I think the tools you need are not present on the MCPC. I'm trying to connect with people on this end to give you the tools you need, but it may take some time, especially with our holidays. It may not be possible, but so far I see no reason why it should not be.

              • 4. Re: openssl libraries for the SCC cores
                viveks

                Hi Ted,

                 

                I was able to get the program to compile (needed the -ldl flag to indicate linking the dynamic loading library since crypto uses that - my advisor told me this because he has used this before and seen this problem) , but I am having trouble getting it to run.

                 

                 

                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ gcc -march=pentium -mtune=pentium -I /usr/include -L /usr/lib32/ -lcrypto -ldl try.c
                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ file a.out 
                a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, not stripped
                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ ldd a.out 
                        linux-gate.so.1 =>  (0xf7760000)
                        libcrypto.so.1.0.0 => /usr/lib32/libcrypto.so.1.0.0 (0xf75f4000)
                        libdl.so.2 => /lib32/libdl.so.2 (0xf75ef000)
                        libc.so.6 => /lib32/libc.so.6 (0xf7495000)
                        /lib/ld-linux.so.2 (0xf7761000)
                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ ssh root@rck00
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
                Someone could be eavesdropping on you right now (man-in-the-middle attack)!
                It is also possible that the RSA host key has just been changed.
                The fingerprint for the RSA key sent by the remote host is
                cd:0a:f3:6c:40:1d:91:47:dc:e0:e7:a3:6f:e4:c2:f2.
                Please contact your system administrator.
                Add correct host key in /home/vivek/.ssh/known_hosts to get rid of this message.
                Offending key in /home/vivek/.ssh/known_hosts:1
                Password authentication is disabled to avoid man-in-the-middle attacks.
                Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
                rck00:/root # Connection to rck00 closed.
                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ cp a.out /shared/vivek/.
                vivek@marc026:~/rcce_target/latest/rcce/apps/DES$ ssh root@rck00
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
                Someone could be eavesdropping on you right now (man-in-the-middle attack)!
                It is also possible that the RSA host key has just been changed.
                The fingerprint for the RSA key sent by the remote host is
                cd:0a:f3:6c:40:1d:91:47:dc:e0:e7:a3:6f:e4:c2:f2.
                Please contact your system administrator.
                Add correct host key in /home/vivek/.ssh/known_hosts to get rid of this message.
                Offending key in /home/vivek/.ssh/known_hosts:1
                Password authentication is disabled to avoid man-in-the-middle attacks.
                Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
                rck00:/root # /shared/vivek/a.out 
                /shared/vivek/a.out: Symbol `memset' has different size in shared object, consider re-linking
                /shared/vivek/a.out: Symbol `memcpy' has different size in shared object, consider re-linking
                Segmentation fault
                rck00:/root # 
                

                 

                Now, googling for this error basically tells me this has something to do with the wrong version of a library being linked. I fiddled around quite a bit with moving libraries from the /lib32 or /usr/lib32 but was generally unsuccesful in getting rid of this. This problems seems to be happening only for the memset and memcpy functions.

                 

                As an extreme thought, do you think cross+recompiling libc for the SCC target might help?

                 

                 

                Regards,

                 

                Vivek

                • 5. Re: openssl libraries for the SCC cores
                  viveks

                  Ted,

                   

                  Bingo! fixed the problems.

                   

                   

                  Like I said in my previous post, the problem seemed to be with some symbols in the C library. I was going through the replies that you had posted for this and realized that if the crypto lib problem was being solved by copying and linking the right library (from the SCC) then I should try that with the libc as well.

                   

                  I copied the libc from the SCC to my shared folder and then used this to compile+link my program.

                   

                  gcc -march=pentium -mtune=pentium -I /usr/include -L /usr/lib32/ -lcrypto -ldl /shared/vivek/libc-2.12.2.so try.c

                   

                   

                  Copied the executable to the shared and ran it. Works perfectly as intended.

                   

                  Regards,

                  Vivek

                  • 6. Re: openssl libraries for the SCC cores
                    viveks

                    If running an executable cribs about symbols being of different size etc on the SCC, it points to some incorrect version of a library having been linked on the MCPC while crosscompiling. The /lib on the SCC cores will have the right versions of the libraries, copy them to some place on the MCPC and use those libraries to link.

                    • 7. Re: openssl libraries for the SCC cores
                      tedk

                      Thanks Vivek. Good detective work. And good comment about the libc. I haven't heard yet from our compiler folks ... I'll try building and runing your try.c with the directions your gave.

                      • 8. Re: openssl libraries for the SCC cores
                        tedk

                        Vivek,

                         

                        Thanks for the great investigation. The good questions always result in some discussion on this end. Please let me paraphrase what one of our compiler experts said.

                         

                        We had to use the dymnamic version of libcrypto. It depends on the dynamic version of libc. Try ldd on libcrypto to see. memset has different sizes in the satic and dynamic versions.

                         

                        Unless we want a purely static executable, it's best to use the dynamic libc (as you did). And we should put that in the cross gcc tree and not force you to copy it from an SCC core (as you did). If we restrict ourselves to the static libc we're bound eventually to conflict with some third party library (like libcrypto).

                         

                        I don't see a way right now that you could have used the cross icc, but I want to give that another try.