Nils Emil P. Ln <neit.dk> writes:
Yes.>> >It is *exceedingly* difficult, to build "backwards compatible"
> >executables. AFAIK, you only have 2 options:
> >o Downgrade the development machine
> You mean switching back to Mdk 8.2 - this is of course an opportunity,
How so? None of the UNIX-like OSes I know support compiling your> but is also a major defeat for Linux...
program on a later release, and running it on an earlier one...
Yes, that is the exceedingly difficult part.>> >o Install a complete glibc-2.2 "cross-compilation" environment
> > [install glibc-2.2 and all of its header files under
> > e.g. /usr/glibc-2.2 and point your -I and -L there]
> This dosn't sound impossible, but I haven't got a good grasp of the
> details. Is this what you call exceedingly difficult (or was that a
> third option)?
Yes, that should be no problem.> BTW can I compile glibc-2.2 with glibc-2.3 on my Mdk 9.1
Configure it with --prefix=/usr/glibc-2.2
That is the difficult part. You will discover that it is more> When glibc-2.2 is installed under /usr/glibc-2.2, what do I then have
> to do to compile my app.? It is just
> gcc -o <program> <objectfiles> -I/usr/glibc-2.2 -L/usr/glibc-2.2
> or will gcc still link to glibc-2.3 ?
difficult than just:
gcc -c -I/usr/glibc-2.2/include <source>.c
gcc -o <program> <objectfiles> -L/usr/glibc-2.2/lib
because there are also startup files (crt0.o, etc.) and dynamic linker
/lib/ld-linux.so.2 to worry about. Start with adding '-v' option to the
command line above, and study the output carefully.
You will probably have to link with -nostdlib -nostartup and
explicitly specify everything.
Also note, that glibc header files include linux *kernel* headers, so
you may have to install a "backward" copy of these as well (assuming
MDK9.1 and MDK8.2 do not ship with the exact same kernel version).
Hmm, that is strange -- if libcomedi.si defines comedi_open().>> >> gcc -o <program> <object files> -lcomedi -lm
> comedi_calibrate(.text+0xcb): )In function 'main':
> undefined reference to 'comedi_open'
> (repeated a lot of times for library functions)
You aren't just supplying full path. You are also selecting *archive*>> >Does /usr/lib/libcomedi.so also exist?
> Yes it does. The strange this it that it works perfectly when I type
> the full path instead of supplying the -lcomedi option!!
version of libcomedi, instead of the shared version that is selected
by -lcomedi. I bet this:
gcc -o ... /usr/lib/libcomedi.so -lm
will also fail with the same error. But I do not know why it fails.
What is the output from
nm -D /usr/lib/libcomedi.so | grep comedi_open
In order to understand recursion you must first understand recursion.