Skip to contentSkip to conversation

Cross-Compiling OpenSSH/OpenSSL

DISCUSSION [email protected] 2 participants 4 messages Jun 28, 2002 – Jun 29, 2002

lore
Share & tools
lore
#0 lore raw

Help! How do I compile OpenSSH/OpenSSL on one machine (running RH7.2) for use on another machine (running stripped RH6.2)? I'm trying to build a server, and don't want to load it up with things not needed like sources and development tools. Also, my user machine compiles a whole lot faster. But when I transfer the resulting binaries, they're expecting different library versions. Suggestions?

#1 lore raw
Quoted 6 lines · [email protected] wrote:

Help! How do I compile OpenSSH/OpenSSL on one machine (running RH7.2) for use on another machine (running stripped RH6.2)? I'm trying to build a server, and don't want to load it up with things not needed like sources and development tools. Also, my user machine compiles a whole lot faster. But when I transfer the resulting binaries, they're expecting different library versions. Suggestions?

Copy the necessary libraries and their associated headers to their own directories on the build system, then force them to be preferred over the system versions, e.g. with

	CFLAGS='-I/path/to/headers'
	LDFLAGS='-L/path/to/libs -Wl,-rpath-link,/path/to/libs'
	export CFLAGS LDFLAGS
	./configure ....

If OpenSSH/OpenSSL don't use autoconf, you may need to modify the Makefiles manually.

Signature · 1 line
Glynn Clements <[email protected]>
#2 lore raw
Quoted 10 lines · Glynn Clements
Quoted 6 lines · [email protected] wrote:

Help! How do I compile OpenSSH/OpenSSL on one machine (running RH7.2) for use on another machine (running stripped RH6.2)? I'm trying to build a server, and don't want to load it up with things not needed like sources and development tools. Also, my user machine compiles a whole lot faster. But when I transfer the resulting binaries, they're expecting different library versions. Suggestions?

Copy the necessary libraries and their associated headers to their own directories on the build system, then force them to be preferred over

How do I go about getting the associated headers for the libraries? I didn't
install any source or headers when I installed the server ...

#3 lore raw
Quoted 7 lines · [email protected] wrote:
Quoted 7 lines
Quoted 6 lines

Help! How do I compile OpenSSH/OpenSSL on one machine (running RH7.2) for use on another machine (running stripped RH6.2)? I'm trying to build a server, and don't want to load it up with things not needed like sources and development tools. Also, my user machine compiles a whole lot faster. But when I transfer the resulting binaries, they're expecting different library versions. Suggestions?

Quoted 5 lines
Quoted 2 lines

Copy the necessary libraries and their associated headers to their own directories on the build system, then force them to be preferred over

How do I go about getting the associated headers for the libraries? I didn't install any source or headers when I installed the server ...

Either:

1. Install the appropriate -devel RPMs on the server, copy the files, then uninstall the RPMs.

2. Convert the RPMs to cpio archives with rpm2cpio then extract the files with cpio.

3. Install the -devel RPMs on the build host (you may need to re-install the original versions afterwards).

In either case, note that the -devel RPMs include the unversioned symlinks (or, in the case of glibc, the linker script) as well as the headers. These are necessary for linking against the correct version of the library.

Signature · 1 line
Glynn Clements <[email protected]>