failing in reproducing .so files

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

failing in reproducing .so files

Giovanni Fontana
Hello everybody,
I'm working on tailoring openssl (v1.1.1b) for various purposes.
Trying to compile (sending the command make on the terminal of linux) it looks quite good the building of every files. At the end the files libcrypto.a and libssl.a are produced, but not the ones with the extension .so

At the end of building log I got the following:

/usr/bin/ld:libcrypto.map:0: syntax error in VERSION script
collect2: error: ld returned 1 exit status
Makefile:754: recipe for target 'libcrypto.so' failed
make[1]: *** [libcrypto.so] Error 1
make[1]: Leaving directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2




No other errors are shown in the entire log.
Sending "make update" command it will not finish the execution (see below)

vm@vm-VirtualBox:~/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b$ make update
( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
            < apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > crypto/objects/obj_mac.new && \
    mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
            include/openssl/obj_mac.h \
            > crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
            crypto/objects/obj_mac.num \
            crypto/objects/obj_xref.txt \
            > crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
                > crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
                > crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
            crypto/objects/obj_dat.h \
            > fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
          /usr/bin/perl util/ck_errf.pl -strict -internal; \
          /usr/bin/perl -I$b util/mkerr.pl  -internal )


Any help?
Thanks in advance
Giovanni Fontana
Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Kurt Roeckx
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Giovanni Fontana
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Kyle Hamilton
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Giovanni Fontana
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Kyle Hamilton
In the unmodified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-working-build.log

In the modified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-broken-build.log

$ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log | ${PAGER:more}

Take note of the differences in output, and use that to determine what broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful when you need to capture why something is failing.)

Good luck.

-Kyle H

On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <[hidden email]> wrote:
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Giovanni Fontana
A little bit further...with my problem in trying to build a tailored version of openSSL. 

If I do make I get at the end of building (trying to make .map file before the .so files )

 creating test/libtestutil.a
ranlib test/libtestutil.a || echo Never mind.
/usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
Error: EVP_PKEY_get0_TUV does not have a number assigned
Makefile:762: recipe for target 'libcrypto.map' failed
make[1]: *** [libcrypto.map] Error 25
make[1]: Leaving directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2



...where EVP_PKEY_get0_TUV is a proprietary function similar to EVP_PKEY_get0_RSA (), 
Usually with a function that does not have a number assigned it could be ok to do a make update, but when I run a make update it stopped after a small while without concluding the action (and no more commands I can run in that terminal window). 
Here the log:

( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
            < apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > crypto/objects/obj_mac.new && \
    mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
            include/openssl/obj_mac.h \
            > crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
            crypto/objects/obj_mac.num \
            crypto/objects/obj_xref.txt \
            > crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
                > crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
                > crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
            crypto/objects/obj_dat.h \
            > fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
          /usr/bin/perl util/ck_errf.pl -strict -internal; \
          /usr/bin/perl -I$b util/mkerr.pl  -internal )




... as I said the compilation is OK for each file (even the one with EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions? 

Kind regards
Giovanni Fontana


 

Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton <[hidden email]> ha scritto:
In the unmodified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-working-build.log

In the modified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-broken-build.log

$ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log | ${PAGER:more}

Take note of the differences in output, and use that to determine what broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful when you need to capture why something is failing.)

Good luck.

-Kyle H

On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <[hidden email]> wrote:
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Dmitry Belyavsky-3
It's worth trying to run make update before running make.

пт, 14 июн. 2019 г., 20:13 Giovanni Fontana <[hidden email]>:
A little bit further...with my problem in trying to build a tailored version of openSSL. 

If I do make I get at the end of building (trying to make .map file before the .so files )

 creating test/libtestutil.a
ranlib test/libtestutil.a || echo Never mind.
/usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
Error: EVP_PKEY_get0_TUV does not have a number assigned
Makefile:762: recipe for target 'libcrypto.map' failed
make[1]: *** [libcrypto.map] Error 25
make[1]: Leaving directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2



...where EVP_PKEY_get0_TUV is a proprietary function similar to EVP_PKEY_get0_RSA (), 
Usually with a function that does not have a number assigned it could be ok to do a make update, but when I run a make update it stopped after a small while without concluding the action (and no more commands I can run in that terminal window). 
Here the log:

( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
            < apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > crypto/objects/obj_mac.new && \
    mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
            include/openssl/obj_mac.h \
            > crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
            crypto/objects/obj_mac.num \
            crypto/objects/obj_xref.txt \
            > crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
                > crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
                > crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
            crypto/objects/obj_dat.h \
            > fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
          /usr/bin/perl util/ck_errf.pl -strict -internal; \
          /usr/bin/perl -I$b util/mkerr.pl  -internal )




... as I said the compilation is OK for each file (even the one with EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions? 

Kind regards
Giovanni Fontana


 

Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton <[hidden email]> ha scritto:
In the unmodified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-working-build.log

In the modified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-broken-build.log

$ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log | ${PAGER:more}

Take note of the differences in output, and use that to determine what broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful when you need to capture why something is failing.)

Good luck.

-Kyle H

On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <[hidden email]> wrote:
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Giovanni Fontana
...I just tried once more and (after a make clean) I run again a make update, but it is stopped always in the same place. No more commands in that specific terminal.
After that opening a new terminal and run the make, of course, I get the same error again (Error: EVP_PKEY_get0_TUV does not have a number assigned).


Il giorno ven 14 giu 2019 alle ore 20:16 Dmitry Belyavsky <[hidden email]> ha scritto:
It's worth trying to run make update before running make.

пт, 14 июн. 2019 г., 20:13 Giovanni Fontana <[hidden email]>:
A little bit further...with my problem in trying to build a tailored version of openSSL. 

If I do make I get at the end of building (trying to make .map file before the .so files )

 creating test/libtestutil.a
ranlib test/libtestutil.a || echo Never mind.
/usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
Error: EVP_PKEY_get0_TUV does not have a number assigned
Makefile:762: recipe for target 'libcrypto.map' failed
make[1]: *** [libcrypto.map] Error 25
make[1]: Leaving directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2



...where EVP_PKEY_get0_TUV is a proprietary function similar to EVP_PKEY_get0_RSA (), 
Usually with a function that does not have a number assigned it could be ok to do a make update, but when I run a make update it stopped after a small while without concluding the action (and no more commands I can run in that terminal window). 
Here the log:

( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
            < apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > crypto/objects/obj_mac.new && \
    mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
            include/openssl/obj_mac.h \
            > crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
            crypto/objects/obj_mac.num \
            crypto/objects/obj_xref.txt \
            > crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
                > crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
                > crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
            crypto/objects/obj_dat.h \
            > fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
          /usr/bin/perl util/ck_errf.pl -strict -internal; \
          /usr/bin/perl -I$b util/mkerr.pl  -internal )




... as I said the compilation is OK for each file (even the one with EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions? 

Kind regards
Giovanni Fontana


 

Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton <[hidden email]> ha scritto:
In the unmodified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-working-build.log

In the modified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-broken-build.log

$ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log | ${PAGER:more}

Take note of the differences in output, and use that to determine what broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful when you need to capture why something is failing.)

Good luck.

-Kyle H

On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <[hidden email]> wrote:
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Kyle Hamilton
In reply to this post by Giovanni Fontana
Log into a different terminal window, run top.  Figure out if it's infinitely looping, if it's getting stuck in a syscall (which sounds likely -- if it is the case, you need to figure out why, which could be as simple as a needed fsck or a required kernel update to address a bug), or if you can kill -9 it when it gets in that state.

You can also try compiling your code on a different machine.  If it fails there, try a different distribution of your OS (if available).  If these all fail, it could be something that the OpenSSL team might need to address in the script.

Good luck.

-Kyle H

On Fri, Jun 14, 2019, 13:13 Giovanni Fontana <[hidden email]> wrote:
A little bit further...with my problem in trying to build a tailored version of openSSL. 

If I do make I get at the end of building (trying to make .map file before the .so files )

 creating test/libtestutil.a
ranlib test/libtestutil.a || echo Never mind.
/usr/bin/perl util/mkdef.pl crypto linux > libcrypto.map
Error: EVP_PKEY_get0_TUV does not have a number assigned
Makefile:762: recipe for target 'libcrypto.map' failed
make[1]: *** [libcrypto.map] Error 25
make[1]: Leaving directory '/home/vm/progetti/OPEN_SSL/OPEN_SSL_QP/openssl-1.1.1b'
Makefile:172: recipe for target 'all' failed
make: *** [all] Error 2



...where EVP_PKEY_get0_TUV is a proprietary function similar to EVP_PKEY_get0_RSA (), 
Usually with a function that does not have a number assigned it could be ok to do a make update, but when I run a make update it stopped after a small while without concluding the action (and no more commands I can run in that terminal window). 
Here the log:

( cd .; /usr/bin/perl VMS/VMSify-conf.pl \
            < apps/openssl.cnf > apps/openssl-vms.cnf )
( cd .; /usr/bin/perl crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
( cd .; /usr/bin/perl crypto/objects/objects.pl -n \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > crypto/objects/obj_mac.new && \
    mv crypto/objects/obj_mac.new crypto/objects/obj_mac.num )
( cd .; /usr/bin/perl crypto/objects/objects.pl \
            crypto/objects/objects.txt \
            crypto/objects/obj_mac.num \
            > include/openssl/obj_mac.h )
( cd .; /usr/bin/perl crypto/objects/obj_dat.pl \
            include/openssl/obj_mac.h \
            > crypto/objects/obj_dat.h )
( cd .; /usr/bin/perl crypto/objects/objxref.pl \
            crypto/objects/obj_mac.num \
            crypto/objects/obj_xref.txt \
            > crypto/objects/obj_xref.h )
( cd .; /usr/bin/perl crypto/conf/keysets.pl \
                > crypto/conf/conf_def.h )
( cd .; /usr/bin/perl crypto/asn1/charmap.pl \
                > crypto/asn1/charmap.h )
( cd .; /usr/bin/perl fuzz/mkfuzzoids.pl \
            crypto/objects/obj_dat.h \
            > fuzz/oids.txt )
( b=`pwd`; set -e; cd .; \
          /usr/bin/perl util/ck_errf.pl -strict -internal; \
          /usr/bin/perl -I$b util/mkerr.pl  -internal )




... as I said the compilation is OK for each file (even the one with EVP_PKEY_get0_TUV) , but then no .so libraries. Any suggestions? 

Kind regards
Giovanni Fontana


 

Il giorno lun 10 giu 2019 alle ore 16:12 Kyle Hamilton <[hidden email]> ha scritto:
In the unmodified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-working-build.log

In the modified directory:
$ make clean
$ make 2>&1 | tee /tmp/openssl-broken-build.log

$ diff /tmp/openssl-working-build.log /tmp/openssl-broken-build.log | ${PAGER:more}

Take note of the differences in output, and use that to determine what broke.  (the '2>&1' syntax redirects stderr to stdout, which is very useful when you need to capture why something is failing.)

Good luck.

-Kyle H

On Mon, Jun 10, 2019, 03:34 Giovanni Fontana <[hidden email]> wrote:
The unmodified version works. As I said, it's sure the issue is on what I added, but info from the building logs is not sufficient to figure out what is the issue there. So as result of the building I have just:
  • libcrypto.a
  • libssl.a
  • libcrypto.map 

so what is missing are the following files:
  • libssl.map
  • libcrypto.so
  • libssl.so

Il giorno dom 9 giu 2019 alle ore 19:30 Kyle Hamilton <[hidden email]> ha scritto:
Can you try building an unmodified version of the tarball, and see if it has a problem?

-Kyle

On Sun, Jun 9, 2019, 07:31 Giovanni Fontana <[hidden email]> wrote:
Hello Kurt,

  • it's perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
  • ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

I guess is something from what I added since the original OPENSSL I'm able to build, as well as other intermediate modifications. My issue is it looks like the log doesn't give so much info and also the make update doesn't complete his task.

BR
Giovanni

Il giorno sab 8 giu 2019 alle ore 18:07 Kurt Roeckx <[hidden email]> ha scritto:
On Sat, Jun 08, 2019 at 12:26:30AM +0200, Giovanni Fontana wrote:
> */usr/bin/ld:libcrypto.map:0: syntax error in VERSION scriptcollect2:

There seems to be a problem generating the libcrypto.map file for
you. What does the file look like? Which perl version are you
using? Which libc do you use?


Kurt

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

OpenSSL - User mailing list
In reply to this post by Giovanni Fontana

If you are adding new functions to the library, you need to

1A           Make sure there is a prototype in one of the existing OpenSSL header files;

                OR

1B           If your prototype is in a new header file, you will have to edit Configurations/unix-Makefile.tmpl to pick up that file.

 

2              Run configure

 

3.            Do “make update”  Verify that the previous steps worked by looking for your new function(s) being declared in util/libcrypto.num

 

4.            Run make

 

This could be documented somewhere; anyone want to copy this email into a new issue?

Reply | Threaded
Open this post in threaded view
|

Re: failing in reproducing .so files

Giovanni Fontana
Thanks Salz,
That investigation I will do for all the files I added, but for sure is not that case for the API I added (EVP_PKEY_get0_TUV)  since is in a "native" openssl file (crypto/evp/p_lib.c and include/openssl/evp.h)... But OK it could be a side effect.

Il giorno ven 14 giu 2019 alle ore 20:48 Salz, Rich <[hidden email]> ha scritto:

If you are adding new functions to the library, you need to

1A           Make sure there is a prototype in one of the existing OpenSSL header files;

                OR

1B           If your prototype is in a new header file, you will have to edit Configurations/unix-Makefile.tmpl to pick up that file.

 

2              Run configure

 

3.            Do “make update”  Verify that the previous steps worked by looking for your new function(s) being declared in util/libcrypto.num

 

4.            Run make

 

This could be documented somewhere; anyone want to copy this email into a new issue?