missing openssl headers

157 views
Skip to first unread message

Laurent Lesage

unread,
Dec 4, 2013, 6:41:54 AM12/4/13
to min...@googlegroups.com
Hello,

we are using here at Université Catholique de Louvain-la-Neuve , a version of Minix for the "operating system" training (version 3.1.8).
We need the openssl headers to use some crypt stuff during practical training on the OS. We do not find the headers, nor the sources, of openssl. I had a look at the git repository but we found the same source tree, i.e. without openssl.

I also browsed the group without luck.

Is there a package like "ssl-dev" on Linux distros we could use to get those headers?

thanks ahead

Antoine LECA

unread,
Dec 4, 2013, 12:08:55 PM12/4/13
to min...@googlegroups.com
Laurent Lesage wrote:
> we are using here at Universit� Catholique de Louvain-la-Neuve , a version
> of Minix for the "operating system" training (version 3.1.8).

I'll assume you are using the old packaging system then, not pkgsrc.

> We need the openssl headers to use some crypt stuff during practical
> training on the OS. We do not find the headers,

Once installed, they should be in /usr/local/ssl/include/openssl

> nor the sources, of openssl.

The source packages were available either on the CD (once c0d2p2 is
mounted as /mnt, look in /mnt/package-sources/openssl-0.9.8a.tar.bz2),
on a website which could have been decommissioned meanwhile
http://www.minix3.org/software/openssl-0.9.8a.tar.bz2
or stored on SVN repository https://gforge.cs.vu.nl/gf/project/minix/
scmsvn/?action=browse&path=/trunk/bigports/openssl-0.9.8a , also copied
in GIT form as http://git.minix3.org/?p=bigports.git;a=tree


Antoine

Laurent Lesage

unread,
Dec 4, 2013, 7:11:01 PM12/4/13
to min...@googlegroups.com


Le mercredi 4 décembre 2013 18:08:55 UTC+1, AntoineLeca a écrit :
Laurent Lesage wrote:
> we are using here at Universit� Catholique de Louvain-la-Neuve , a version
> of Minix for the "operating system" training (version 3.1.8).

I'll assume you are using the old packaging system then, not pkgsrc.
Yes. I tried pkgsrc following a suggestion of Ben Gras (Minix), but the "git" package is missing on the repository.

> We need the openssl headers to use some crypt stuff during practical
> training on the OS. We do not find the headers,

Once installed, they should be in /usr/local/ssl/include/openssl

OK, I found them in /usr/pkg/include/openssl (I'm not used to minix command to search and browse the FS). I also found the libs in /usr/pkg/lib. But now the problem is I cannot compile. With "cc" I get (same for libssl) :
"/usr/lib/em_led: /usr/pkg/lib/libcrypto.a: wrong magic number (fatal)"

Is there a specific option  to use those libs? Or do I have to compile form sources??

Laurent

Antoine LECA

unread,
Dec 5, 2013, 3:36:22 AM12/5/13
to min...@googlegroups.com
Laurent Lesage wrote (�crivit):
> Le mercredi 4 d�cembre 2013 18:08:55 UTC+1, AntoineLeca a �crit :
>>
>> Laurent Lesage wrote:
>>> [...] Minix for the "operating system" training (version 3.1.8).
>>
>> I'll assume you are using the old packaging system then, not pkgsrc.
>>
> Yes. I tried pkgsrc following a suggestion of Ben Gras (Minix), but the
> "git" package is missing on the repository.

First, git (vs. svn) is independent from pkgsrc vs. the old "packman",
even if they both occurred around the same time frame, 3 years ago.

It seems to me there IS a (binary) OpenSSL package for 3.1.8 pkgsrc, at
ftp.minix3.org/pub/minix/packages/3.1.8/i386/All/openssl-0.9.8o.tgz
However, I have no idea how to retrieve the associated source for it,
sorry; I guess you could install the relevant git repository, then guess
which was the date the package was compiled, then use pkgsrc; but I am
not able to confirm the exact steps. Also unfortunately, the early Git
repository for pkgsrc-for-MINIX3 (github.com/gautambt/Pkgsrc-Minix/
based on http://wiki.minix3.org/SummerOfCode2010/PkgSrc project) seems
lost; you might find more informations from
https://groups.google.com/forum/#!searchin/minix3/Pkgsrc/minix3/jmvhMW7W4P8/t92kVtiYczwJ


>>> We do not find the [openssl] headers,
>> Once installed, they should be in /usr/local/ssl/include/openssl
> OK, I found them in /usr/pkg/include/openssl

So I understand you discarded my suggestion and went the pkgsrc route;
no problem, I'll adapt myself.

> But now the problem is I cannot compile. With "cc" I get

... errors. The point is, pkgsrc library packages are NOT made for cc,
they are exclusively to be used with the MINIX port of GCC, which with
3.1.8 is still ACK .out (a variant of the old Unix a.out format) based.
Perhaps you can find a working version of Clang for your 3.1.8 version
(final of 2010 was the time when it started to work.)

But the old ACK cc cannot deal with any pkgsrc package, no way.

On the other hand, now specifically OpenSSL, I do not think the old
packman package for it was compatible with ACK either; in fact, I
believe ACK is lacking some key features like 64-bit support which
prevent normal use of OpenSSL in this decade; so I believe you should
switch to some more modern compiling system if you are serious about
using OpenSSL.
Note you can perhaps bite the bullet and switch also to a more modern
release of MINIX; it will make your life quite a bit easier.


Antoine

Laurent Lesage

unread,
Dec 5, 2013, 6:10:16 AM12/5/13
to min...@googlegroups.com
.......

We do not find the [openssl] headers, 
Once installed, they should be in /usr/local/ssl/include/openssl 
OK, I found them in /usr/pkg/include/openssl
So I understand you discarded my suggestion and went the pkgsrc route;
no problem, I'll adapt myself.
In fact, i didn't : pkgsrc is not used. Those headers and libs were present but I didn't know they were there. I used "find" to search but it does not work the "linux way" and I didn't find those directories before.

But now the problem is I cannot compile. With "cc" I get
... errors. The point is, pkgsrc library packages are NOT made for cc,
they are exclusively to be used with the MINIX port of GCC, which with
3.1.8 is still ACK .out (a variant of the old Unix a.out format) based.
Perhaps you can find a working version of Clang for your 3.1.8 version
(final of 2010 was the time when it started to work.)
I also tried to compile with gcc (gcc44). But il told me the lib format was wrong. So, doesn't work with cc, nor gcc...

But the old ACK cc cannot deal with any pkgsrc package, no way.

On the other hand, now specifically OpenSSL, I do not think the old
packman package for it was compatible with ACK either; in fact, I
believe ACK is lacking some key features like 64-bit support which
prevent normal use of OpenSSL in this decade; so I believe you should
switch to some more modern compiling system if you are serious about
using OpenSSL.
Note you can perhaps bite the bullet and switch also to a more modern
release of MINIX; it will make your life quite a bit easier.
The problem is that this is a "teaching" version installed by the sysadmin team, and it is difficult to change the version as exercises for the students are dedicated to this installed version.
I'll keep you informed if we find a solution

Laurent

Antoine LECA

unread,
Dec 5, 2013, 8:07:42 AM12/5/13
to min...@googlegroups.com
Laurent Lesage �crivit :
> .......
>>>>> We do not find the [openssl] headers,
>>>> Once installed, they should be in /usr/local/ssl/include/openssl
>>> OK, I found them in /usr/pkg/include/openssl
>> So I understand you discarded my suggestion and went the pkgsrc route;
>> no problem, I'll adapt myself.
> In fact, i didn't : pkgsrc is not used.

OpenSSL is *NOT* part of base MINIX 3.1.8; you need to install some
packages (same goes for GCC, by the way.)

Either you are using the old "packman" system, which is based on
/usr/local, with indeed quite a strange path to access the headers (but
with the .pc files to use with pkg-config, as used on Linux.)

Or you are using the "new" (as of 2010) pkgsrc system, which is based on
/usr/pkg; and I understand you went that later way.


> I also tried to compile with gcc (gcc44). But il told me the lib format
> was wrong.

Mmmm, now that is a real problem.

However, this is a problem I cannot currently reproduce here.

Assuming you successfully set up gcc44 from pkgsrc to compile without
problem (admittedly not an easy task on 3.1.8+pkgsrc, which was rough
then), I did not experience any additional problem linking with -lssl


Antoine

Laurent Lesage

unread,
Dec 5, 2013, 8:57:32 AM12/5/13
to min...@googlegroups.com


Le jeudi 5 décembre 2013 14:07:42 UTC+1, AntoineLeca a écrit :
Laurent Lesage �crivit :
> .......
>>>>> We do not find the [openssl] headers,
>>>> Once installed, they should be in /usr/local/ssl/include/openssl
>>> OK, I found them in /usr/pkg/include/openssl
>> So I understand you discarded my suggestion and went the pkgsrc route;
>> no problem, I'll adapt myself.
> In fact, i didn't : pkgsrc is not used.

OpenSSL is *NOT* part of base MINIX 3.1.8; you need to install some
packages (same goes for GCC, by the way.)

Either you are using the old "packman" system, which is based on
/usr/local, with indeed quite a strange path to access the headers (but
with the .pc files to use with pkg-config, as used on Linux.)

In fact, I can not tell. I'm just using the minix install which is available on our LAN, and we use it with a .cow source disk that students modify (they add some parts to the OS to learn how it works and how they can add sthg in the minix tree ). the openssl pkg was installed with pkgin as far as I can see. So, the path for the libs and headers must have been set by the pkgin tool I suppose. This package is part of this minix version (as seen with pkgin list).
Or you are using the "new" (as of 2010) pkgsrc system, which is based on
/usr/pkg; and I understand you went that later way.


> I also tried to compile with gcc (gcc44). But il told me the lib format
> was wrong.

Mmmm, now that is a real problem.

I tested again, what it says is that the function are not defined, as if the libraries where not the good ones .
/tmp/ccfLU9Nt.o:/tmp/ccfLU9Nt.o:(.text+0x2c): undefined reference to `_BF_set_key'
Even if it worked, it would not be usable : as we have to compile our patch to minix with cc, we could not link those libs if they are compiled with gcc.

Thank you for your support.
Reply all
Reply to author
Forward
0 new messages