473,785 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

autoconf and shared library

I hope I am posting this to the right newsgroup. I tried submitting this to the
au******@gnu.or g mailing list, but I see no activity. If this is the wrong
newsgroup, I would appriciate a reference to a different source.

My question was:

One of my source files uses the library:

#include <openssl/md5.h>

This forces me to add /usr/lib/libcrypto.so to the gcc command when I link the
object to produce an executable for instance. My gcc command looks something
like below:

gcc --pedantic -Wall -std=c99 -O2 -g -O2 /usr/lib/libcrypto.so -o main Main.o
my_md5.o

I was studying autoconf today and was wondering how I can assert that the user
compiling does in fact have the libcrypto.so shared object.

e.g. ./configure would check to make sure libcrypto.so is available... at least
it's functionality--the function MD5_Init is defined for example.

Is this possible?

Second Question:

As programs grow in complexity and require many of these shared objects, what is
the best way to assure portability? Do I include the code for libcrypto.c for
the user to compile if they don't have libcrypto.so? Or do I provide the user
with an unfriendly error message from the compiler.

Also, the location of my libcrypto.so object may differ from other peoples. How
do I deal with that?

Thanks,
Matt
Mar 26 '06
11 2541
CBFalconer wrote:
Mark McIntyre wrote:
"Richard G. Riley" <rg****@gmail.c om> wrote:
On 2006-03-26, Robert Gamble <rg*******@gmai l.com> wrote:

li********* *@gmail.com wrote:

>Matt Kowalczyk wrote:

>>I hope I am posting this to the right newsgroup. I tried
>>submittin g this to the au******@gnu.or g mailing list, but I
>>see no activity. If this is the wrong newsgroup, I would
>>appriciat e a reference to a different source.
>
>This is indeed the wrong newsgroup, but it seems you originally
>posted this in the correct one with no reply, which is a good
>enough excuse for me.

If this is the case, why wouldn't you post your response in the
correct forum where it would be on topic?

Out of curiosity where is the correct newsgroup for C programmers
to discuss (multi-platform) tools and libraries?


I doubt there is one - the details of tools tend to be discussed
either in groups specific to the tool (if they're in general enough
use) or in groups specific to the OS or compiler environment.

At a guess, comp.programmin g and comp.os.linux.m isc would seem to
be suitable.


I also got shutdown at comp.programmin g, I'll try the linux.misc.
Mar 26 '06 #11
On Sat, 25 Mar 2006 18:14:30 -0800, Matt Kowalczyk
<ma******@comca st.net> wrote:
I hope I am posting this to the right newsgroup. I tried submitting this to the
au******@gnu.or g mailing list, but I see no activity. If this is the wrong
newsgroup, I would appriciate a reference to a different source.

My question was:

One of my source files uses the library:

#include <openssl/md5.h>

This forces me to add /usr/lib/libcrypto.so to the gcc command when I link <snip>
I was studying autoconf today and was wondering how I can <snip>
Is this possible?
Don't know.
Second Question:

As programs grow in complexity and require many of these shared objects, what is
the best way to assure portability? Do I include the code for libcrypto.c for
the user to compile if they don't have libcrypto.so? Or do I provide the user
with an unfriendly error message from the compiler.

There is no single libcrypto.c. The source for openssl's crypto
library is BIG: the last time I looked, about a thousand files in a
few dozen directories with a good deal of interdependency and their
own complicated make-file scheme (not autoconf or automake). You
certainly could provide a copy of (or point to) the source tarball and
instruct users to install and build it, if on a system (or for Linux,
distro) that doesn't already have it but is supported.

Alternatively, if you need ONLY MD5, you could just use the reference
code in RFC 1321 (at rfc-editor.org or faqs.org or many other places)
or use or at least look at the (basically trivial) implementation in
GNU textutils (md5sum).

Incidentally, I assume you are aware that research in the past year
has found extremely cheap ways of generating collisions for MD5,
albeit of restricted form, so it is no longer safe for uses that
require collision resistance, and SHA-1 also appears to be seriously
weakened for such. Uses that require only 2nd-preimage resistance,
like HMAC and signing of data generated or significantly modified
especially randomized by the signer, still appear safe.

- David.Thompson1 at worldnet.att.ne t
Apr 16 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2057
by: Michael Ströder | last post by:
HI! Is it possible to probe for installed libs with DistUtils? I'd like to automatically search for optional libs and adjust C compiler switchers before starting the build of a the extension module. Ciao, Michael.
0
1336
by: Mark Asbach | last post by:
Hi Python-Pros, I'm working on a project using an embedded and extended python interpreter. We use autoconf/automake/libtool and have our own autoconf macros for detecting a python installation. Everythings works fine under traditional UNIX, but since we're trying to port to other platforms like Mac OS or Windows, we are in trouble. My question is: how can I find out, which compiler and linker options are necessary to build a custom...
0
1319
by: Heiko Wundram | last post by:
Hi all! Although it's slightly OT: I've written PAM, NSS and PPPd plugins which do authentication (and other things) against a running Python daemon, communicating via a Unix domain socket. For the C part of the whole adventure (the modules for PAM, NSS and PPPd), I'd love to have some form of autoconf/automake installation routine before I distribute the whole thing, but I myself am not knowledgeable with the use of automake and...
1
4424
by: AH | last post by:
I have two functions in my shared library which are declared as follows: void setName(const std::string& str); std::vector<std::string> getInfo(); Since the code is compiled and in shared library. Every thing is great if the customer of my shared library is using the same compiler version (and same STL version). I am wondering if the customer changes their compiler version (or STL version) which may have same interface
0
1216
by: Hallvard B Furuseth | last post by:
I want to use Python as an extension language in a package which uses autoconf. That means its and Python's autoconf #defines can conflict, so I can't safely #include both <Python.h> and the package's own include files:-( Do anyone have a safe way to #include at least <object.h> without <pyconfig.h>? E.g. copy the files (and <pyport.h>'s PyAPI_FUNC/PyAPI_DATA) and rename the autoconf macros - and fail compilation if that wouldn't work?
0
4430
by: Tom | last post by:
I've been trying to install the PECL library libssh2 for secure shell2 functions. I'm on a shared webhost which allows custom php installations that run as a CGI binary. I've been trying to configure libssh2 but I cannot get the server I'm on to find autoconf... it originally was not installed on the server, so I downloaded, unpacked, and installed it successfully to a custom folder in my /home directory (along with autoheader). ...
1
6592
by: Tom | last post by:
I'm trying to install the Fileinfo extensions from a PECL library called "fileinfo". The install fails because autoconf cannot be found. I have a custom installation of autoconf running out of my home directory (I do not have root access), so it's not in the default location (presumably something like /usr/bin/autoconf). I don't know how to manually force ./configure and make to look for autoconf in a custom location. I would guess...
1
5037
by: Daniel Nogradi | last post by:
It might be slightly off topic here but couldn't find a more suitable place for this question: I'm trying to build the python binding for ming -- http://ming.sf.net -- but for some reason the python macro for autoconf -- python.m4 -- doesn't seem to detect my python installation correctly. The strange thing is that it seemingly detects everything correctly, but a final check still fails. I have the python 2.5 source distribution...
1
1285
by: Ruben | last post by:
Where is the best news group to discuss autoconf I have to tip my hat to the GNU developers becaause autoconf seems like an animal, impossible to learn. Between M4, C Marcos, GDB, C++, C- and GTK/Gnome, its a huge mindshare to work with, and then throw in VIM macros and/EMACS, you need to be a guinius to make any contribtuions today to anything GNU i'm going back to my sendmail configuration files ;)
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10090
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.