2020-11-27 02:02 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000517mercuryBugpublic2020-09-16 23:51
Reporterkeri 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000517: extras/mopenssl fails to compile in a par grade with libressl
DescriptionUsing a par grade mopenssl.c fails to compile with libressl:

Making Mercury/os/mopenssl.o
mopenssl.m: In function 'mopenssl_module10':
mopenssl.m:116.49: error: 'pthreads_thread_id' undeclared (first use in this function)
mopenssl.m:116.49: note: each undeclared identifier is reported only once for each function it appears in
mopenssl.m:116:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
mopenssl.m:117.45: error: 'pthreads_locking_callback' undeclared (first use in this function); did you mean 'CRYPTO_SET_locking_callback'?
mopenssl.m:117.45: note: each undeclared identifier is reported only once for each function it appears in
mopenssl.m:117:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
mopenssl.m: At top level:
mopenssl.m:125:6: warning: no previous prototype for 'pthreads_locking_callback' [-Wmissing-prototypes]
mopenssl.m:135.15: warning: no previous prototype for 'pthreads_thread_id' [-Wmissing-prototypes]
** Error making 'Mercury/os/mopenssl.o'.
Steps To Reproduce* use a version of Mercury configured with --enable-par-grades
* compile extras/mopenssl on a host with libressl installed

$ cd extras/mopenssl
$ cp ../net/*.m ./
$ mmc --grade asm_fast.par.gc.stseg --make libopenssl
Additional InformationThe attached diff adds function prototype declarations which allows mopenssl to compile.
TagsNo tags attached.
Attached Files
  • patch file icon mercury-extras-mopenssl.patch (505 bytes) 2020-09-16 23:51 -
    diff --git a/extras/mopenssl/mopenssl.m b/extras/mopenssl/mopenssl.m
    index d5c1fb7d7..34f89db55 100644
    --- a/extras/mopenssl/mopenssl.m
    +++ b/extras/mopenssl/mopenssl.m
    @@ -113,6 +113,9 @@
             pthread_mutex_init(&(lock_cs[i]), NULL);
         }
     
    +    unsigned long pthreads_thread_id(void);
    +    void pthreads_locking_callback(int, int, char*, int);
    +
         CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id);
         CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback);
     #endif
    
    patch file icon mercury-extras-mopenssl.patch (505 bytes) 2020-09-16 23:51 +

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2020-09-16 23:51 keri New Issue
2020-09-16 23:51 keri File Added: mercury-extras-mopenssl.patch
+Issue History