LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-25-2022, 12:30 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,694

Rep: Reputation: 187Reputation: 187
problems compiling mailx 12.5


After upgrading to Slackware 15.0, it included a new version of mailx 14.9.23. The new "features" break all the old scripts using mailx and introduced a much more complicated search syntax, among numerous other problems. Why a little used mail client that is at least 30 years old needed a major upgrade that is not backward compatible escapes me, but I'll spare further ranting.

I have downloaded the source files for mailx 12.5. When I try to 'make' it, I get the following errors:
Code:
/usr/bin/ld: openssl.o: in function `ssl_rand_init':
openssl.c:(.text+0x124): undefined reference to `RAND_egd'
/usr/bin/ld: openssl.o: in function `ssl_select_method':
openssl.c:(.text+0x449): undefined reference to `SSLv2_client_method'
collect2: error: ld returned 1 exit status
make: *** [Makefile:92: mailx] Error 1
The download included a patch with description as follows:
Code:
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2014-12-27
Initial Package Version: 12.5
Upstream Status: Unknown
Origin: Changes to remove SSL2 found at debian, remainder from redhat.
Description: Removes support for SSL2 (openssl no longer supports it)
and fixes CVE-2004-2771 [sic] and CVE-2014-7844.
I applied this patch:
Code:
# patch < ../heirloom-mailx-12.5-fixes-1.patch 
patching file extern.h
patching file fio.c
patching file mailx.1
patching file names.c
patching file openssl.c
patching file sendout.c
but when re-making I still get the first two errors:
Code:
/usr/bin/ld: openssl.o: in function `ssl_rand_init':
openssl.c:(.text+0x124): undefined reference to `RAND_egd'
collect2: error: ld returned 1 exit status
make: *** [Makefile:92: mailx] Error 1
I don't know why I would need SSL in a text editor; could I possible NOT call RAND_egd?

Any ideas as to how I can fix these two errors?

Last edited by mfoley; 10-25-2022 at 12:33 PM.
 
Old 10-25-2022, 05:10 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,214
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
Originally Posted by mfoley View Post
After upgrading to Slackware 15.0, it included a new version of mailx 14.9.23. The new "features" break all the old scripts using mailx and introduced a much more complicated search syntax, among numerous other problems. Why a little used mail client that is at least 30 years old needed a major upgrade that is not backward compatible escapes me, but I'll spare further ranting.

I have downloaded the source files for mailx 12.5. When I try to 'make' it, I get the following errors:
Code:
/usr/bin/ld: openssl.o: in function `ssl_rand_init':
openssl.c:(.text+0x124): undefined reference to `RAND_egd'
/usr/bin/ld: openssl.o: in function `ssl_select_method':
openssl.c:(.text+0x449): undefined reference to `SSLv2_client_method'
collect2: error: ld returned 1 exit status
make: *** [Makefile:92: mailx] Error 1
The download included a patch with description as follows:
Code:
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2014-12-27
Initial Package Version: 12.5
Upstream Status: Unknown
Origin: Changes to remove SSL2 found at debian, remainder from redhat.
Description: Removes support for SSL2 (openssl no longer supports it)
and fixes CVE-2004-2771 [sic] and CVE-2014-7844.
I applied this patch:
Code:
# patch < ../heirloom-mailx-12.5-fixes-1.patch 
patching file extern.h
patching file fio.c
patching file mailx.1
patching file names.c
patching file openssl.c
patching file sendout.c
but when re-making I still get the first two errors:
Code:
/usr/bin/ld: openssl.o: in function `ssl_rand_init':
openssl.c:(.text+0x124): undefined reference to `RAND_egd'
collect2: error: ld returned 1 exit status
make: *** [Makefile:92: mailx] Error 1
I don't know why I would need SSL in a text editor; could I possible NOT call RAND_egd?

Any ideas as to how I can fix these two errors?
According to this, after patching you should use sed:
Code:
patch -Np1 -i ../heirloom-mailx-12.5-fixes-1.patch &&

sed 's@<openssl@<openssl-1.0/openssl@' \
    -i openssl.c fio.c makeconfig      &&

make -j1 LDFLAGS+="-L /usr/lib/openssl/" \
         SENDMAIL=/usr/sbin/sendmail
 
1 members found this post helpful.
Old 11-06-2022, 11:22 AM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,694

Original Poster
Rep: Reputation: 187Reputation: 187
bathory, I will hang onto that link for future reference. I did get it running. The ssl_rand_init() function in openssl.c was the problem. I simply commented out the original function body:
Code:
static int ssl_rand_init(void)
{
    return 0;
}
So far, that seems to work. I'm not entirely sure why SSL is needed for a text editor. The commentary in this programs says:
Quote:
* OpenSSL client implementation according to: John Viega, Matt Messier,
* Pravir Chandra: Network Security with OpenSSL. Sebastopol, CA 2002.
which doesn't give much insight into its use. For my part, I don't see a need for SSL when edit text files on my local computer.
 
  


Reply

Tags
mailx, make, ssl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling mailx 12.5 on Slackware 15.0 mfoley Slackware 5 07-04-2022 02:15 PM
[SOLVED] Compiling mailx 12.5 on Slackware 15.0 mfoley Linux From Scratch 3 06-25-2022 01:04 PM
[SOLVED] "Snorkeling on an empty pipe": error in S-mailx (mailx 4.19.11) RandomTroll Linux - Software 0 11-30-2018 11:45 PM
TO ANYONE USING MAILX (mailx 12.1). stf92 Linux - Software 22 07-08-2010 10:44 PM
Problems during installing mailx .... rakeshj Linux - Software 0 08-12-2007 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration