How do I resolve the error: munch: The input file ... is not valid in the current object mode.
Posted in 2003
Darrin Wolf couldn't link his app against Informix ESQL/C shared libraries on AIX 5.2 with VisualAge C++ 6, getting "munch: The input file /informix/lib/esql/libifsql.so is not valid in the current object mode", so the target .so was never built. He suspected a 32- vs 64-bit mismatch or wrong static/shared linking. Nicholas Dronen suggested checking with nm -X64; that showed libifsql.so is genuinely 64-bit, pointing to the application objects being compiled in 32-bit mode. Darrin said he'd verify his own objects, but no confirmed fix is posted in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Internationalization & Character Sets
Question for the gurus out there--or at least anyone that knows more than I do about AIX 5.2 and Visual Age 6.0! I have run into an error message that I cannot really identify. I really do not know if it is AIX specific, or INFORMIX 64-bit specific, since the error occurs when linking my application code to the INFORMIX ESQL libs. Here is a paste of the error from a terminal console: ---------------------------------------------------------------------------- ---- Compiling "rel.vjdinf72/dbifinf72.o" done. Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ... rm -f /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so /usr/vacpp/bin/xlC_r \\ -L/informix/lib -L/informix/lib/esql -lifsql -lifasf -lifgen -lifos -lifgls -lnetstub -lc -lmsaa -lbsd -ldl -ltli \\ /informix/lib/esql/checkapi.o -lifglx -L/testinf/viaware/htool/vjd/vjd143/li b -lvjdcpp -lvjdsql \\ ./rel.vjdinf72/dbifinf72.o \\ -qmkshrobj=0 \\ -e getSharedLibStartupInfo__Fv -brtl \\ -o/testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so 2>&1 munch: The input file /informix/lib/esql/libifsql.so is not valid in the current object mode. Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done. ---------------------------------------------------------------------------- ---- Now, of course, as a result of this 'munch' error the target, /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really created. Another developer where I work claims that 'a quick search on google' implies that this is related to a 32- vs. 64-bit library issue--sort of implying that either my /informix/lib/esql libraries may not be 64-bit, or the way that I am building our application objects is incompatible with 64-bit ESQL libs. Or perhaps I should be statically linking rather than attempting to link with shared objects in /informix/lib/esql libraries. (However, our MAKEFILEs have not changed from previous versions of AIX and Visual Age--we have always built a shared object--not a static object.) It seems like one of the following are going on (below) -- I'm not sure which, and have read quite a bit from the following manuals: Compiler Reference, VisualAge C++ Professional for AIX, Version 6.0 http://www-1.ibm.com/support/docview.wss?uid=swg27002102 (sc094959.pdf) IBM Informix ESQL/C Programmer's Manual http://www-3.ibm.com/software/data/informix/pubs/library/interim/ct1uhna-pdf.html (ct1uhna.pdf) APPENDIX N How do I compile ESQL/C code for use with C++? http://www.smooth1.demon.co.uk/ifaqn.htm No luck. I am sure that one of you have seen this kind of "munch" issue before? 'munch' seems to be some sort of linker utilitity or perhaps a script from what I have been able to understand after reading google URLs found, and the VAC/VACPP compiler documentation for Visual Age 6. Unfortunately, the documentation for Visual Age 6 and the INFORMIX manual above offered me no solid clues for resolving this kind of problem--or even exactly what the problem is. I just keep digging up vague information about the compiler -tm option. I simply have not been able to find enough information for me to figure out exactly what is wrong, but all of the googling seems to point to 32-bit vs. 64-bit libs difference. I think I have narrowed it down to one of the following possibilities--maybe it isn't related to any of them: a.. The /informix/lib/esql/libifsql.so file might be a 32-bit library, and I need to use some other (64-bit) *.so or *.a files or directory path? (Does this box I am working on need some kind of 64-bit version of /informix/lib/esql/* libs?) b.. Do I have to link and compile with static ESQL libs using /informix/lib/esql/libifsql.a with different compiler options to do so for the 64-bit kernel version of AIX and Visual Age? Won't doing so mean that all of our applications that use it, now have to link it into their binaries? c.. Are the MAKEFILE rules below inappropriate -L libs for 64-bit kernel and 64-bit INFORMIX ESQL/C? (See below.) BTW: How can I check my INFORMIX ESQL/C libs to determine if they are 32-bit or 64-bit? ---------------------------------------------------------------------------- ---- Contents of my MAKEFILE ($VJDDIR/config/AIX/make_INF.inc): ############################################################################ ### # # Definitions for INFORMIX # ############################################################################ ### # # INFORMIX include # INFORMIX_INCLUDE := -I$(INFORMIXDIR)/incl/esql -I$(INFORMIXDIR)/incl # # INFORMIX libraries # from $INFORMIXDIR/bin/esql -libs # INFORMIX_LIBS := \\ -L$(INFORMIXDIR)/lib -L$(INFORMIXDIR)/lib/esql \\ -lifsql -lifasf -lifgen -lifos -lifgls -lnetstub \\ -lc -lmsaa -lbsd -ldl -ltli \\ $(INFORMIXDIR)/lib/esql/checkapi.o -lifglx # # ESQL # ESQLC := $(INFORMIXDIR)/bin/esql -e ---------------------------------------------------------------------------- ---- Any help would be greatly appreciated! Please respond to this thread, or via email: darrin.wolf -@- provia . com if you need any more information. I can provide more AIX/Visual Age version info from this box as needed--I'm quite sure you might need at least the following information to help diagnose: ---------------------------------------------------------------------------- ---- # uname -a AIX finch 2 5 000AB86D4C00 # /usr/sbin/prtconf -c CPU Type: 64-bit # xlC_r -V /usr/bin/pg /usr/lib/nls/msg/en_US/vacpp.help VisualAge C++ Professional / C for AIX Compiler, Version 6 mailto:darrin.wolf@provia.com http://www.provia.com Provia. Software 5460 Corporate Grove Boulevard SE Grand Rapids Michigan 49512-5500
In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote: DW> Question for the gurus out there--or at least anyone that knows more than I DW> do about AIX 5.2 and Visual Age 6.0! DW> I have run into an error message that I cannot really identify. I really do DW> not know if it is AIX specific, or INFORMIX 64-bit specific, since the error DW> occurs when linking my application code to the INFORMIX ESQL libs. DW> Here is a paste of the error from a terminal console: DW> Compiling "rel.vjdinf72/dbifinf72.o" done. DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ... [ snip ] DW> munch: The input file /informix/lib/esql/libifsql.so is not valid in the DW> current object mode. DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done. DW> Now, of course, as a result of this 'munch' error the target, DW> /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really created. DW> Another developer where I work claims that 'a quick search on google' DW> implies that this is related to a 32- vs. 64-bit library issue--sort of DW> implying that either my /informix/lib/esql libraries may not be 64-bit, or DW> the way that I am building our application objects is incompatible with DW> 64-bit ESQL libs. Or perhaps I should be statically linking rather than DW> attempting to link with shared objects in /informix/lib/esql libraries. DW> (However, our MAKEFILEs have not changed from previous versions of AIX and DW> Visual Age--we have always built a shared object--not a static object.) Did this break when you upgraded from AIX 4.3.3 to 5.2? If so, I suspect the Informix 64-bit libraries are old-style 64-bit libraries that are not compatible with AIX 5.x. Regards, Nicholas -- "Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html "Meanings are another story." http://www.ifas.org/wa/glossolalia.html
"Nicholas Dronen" <ndronen@io.frii.com> wrote in message news:3ef1f7a1$0$197$75868355@news.frii.net... > In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote: > DW> Question for the gurus out there--or at least anyone that knows more than I > DW> do about AIX 5.2 and Visual Age 6.0! > > DW> I have run into an error message that I cannot really identify. I really do > DW> not know if it is AIX specific, or INFORMIX 64-bit specific, since the error > DW> occurs when linking my application code to the INFORMIX ESQL libs. > > DW> Here is a paste of the error from a terminal console: > > DW> Compiling "rel.vjdinf72/dbifinf72.o" done. > DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ... > > [ snip ] > > DW> munch: The input file /informix/lib/esql/libifsql.so is not valid in the > DW> current object mode. > DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done. > > DW> Now, of course, as a result of this 'munch' error the target, > DW> /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really created. > > DW> Another developer where I work claims that 'a quick search on google' > DW> implies that this is related to a 32- vs. 64-bit library issue--sort of > DW> implying that either my /informix/lib/esql libraries may not be 64-bit, or > DW> the way that I am building our application objects is incompatible with > DW> 64-bit ESQL libs. Or perhaps I should be statically linking rather than > DW> attempting to link with shared objects in /informix/lib/esql libraries. > DW> (However, our MAKEFILEs have not changed from previous versions of AIX and > DW> Visual Age--we have always built a shared object--not a static object.) > > Did this break when you upgraded from AIX 4.3.3 to 5.2? If so, I suspect > the Informix 64-bit libraries are old-style 64-bit libraries that are not > compatible with AIX 5.x. I am asking our IT department, but I am quite certain, since we just received this box (on behalf of one of our customers) from IBM, that everything is installed out-of-the-box. I do not believe that any software on the box is "upgraded" software. Unless part of an install requires you to install X, then upgrade to X+1... which seems really hoaky for a brand new box--but not outside the realm of possibility I suppose. Thanks for your reply! (I hope this is not a top-post.) :-) Darrin > > Regards, > > Nicholas > > -- > "Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html > "Meanings are another story." http://www.ifas.org/wa/glossolalia.html
"Nicholas Dronen" <ndronen@io.frii.com> wrote in message news:3ef1f7a1$0$197$75868355@news.frii.net... > In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote: > DW> Question for the gurus out there--or at least anyone that knows more than I > DW> do about AIX 5.2 and Visual Age 6.0! > > DW> I have run into an error message that I cannot really identify. I really do > DW> not know if it is AIX specific, or INFORMIX 64-bit specific, since the error > DW> occurs when linking my application code to the INFORMIX ESQL libs. > > DW> Here is a paste of the error from a terminal console: > > DW> Compiling "rel.vjdinf72/dbifinf72.o" done. > DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ... > > [ snip ] > > DW> munch: The input file /informix/lib/esql/libifsql.so is not valid in the > DW> current object mode. > DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done. > > DW> Now, of course, as a result of this 'munch' error the target, > DW> /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really created. > > DW> Another developer where I work claims that 'a quick search on google' > DW> implies that this is related to a 32- vs. 64-bit library issue--sort of > DW> implying that either my /informix/lib/esql libraries may not be 64-bit, or > DW> the way that I am building our application objects is incompatible with > DW> 64-bit ESQL libs. Or perhaps I should be statically linking rather than > DW> attempting to link with shared objects in /informix/lib/esql libraries. > DW> (However, our MAKEFILEs have not changed from previous versions of AIX and > DW> Visual Age--we have always built a shared object--not a static object.) > > Did this break when you upgraded from AIX 4.3.3 to 5.2? If so, I suspect > the Informix 64-bit libraries are old-style 64-bit libraries that are not > compatible with AIX 5.x. > Confirmed: Clean install. -Darrin > Regards, > > Nicholas > > -- > "Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html > "Meanings are another story." http://www.ifas.org/wa/glossolalia.html
In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote:
DW> "Nicholas Dronen" <ndronen@io.frii.com> wrote in message
DW> news:3ef1f7a1$0$197$75868355@news.frii.net...
>> In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote:
>> DW> Question for the gurus out there--or at least anyone that knows more
DW> than I
>> DW> do about AIX 5.2 and Visual Age 6.0!
>>
>> DW> I have run into an error message that I cannot really identify. I
DW> really do
>> DW> not know if it is AIX specific, or INFORMIX 64-bit specific, since the
DW> error
>> DW> occurs when linking my application code to the INFORMIX ESQL libs.
>>
>> DW> Here is a paste of the error from a terminal console:
>>
>> DW> Compiling "rel.vjdinf72/dbifinf72.o" done.
>> DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ...
>>
>> [ snip ]
>>
>> DW> munch: The input file /informix/lib/esql/libifsql.so is not valid in
DW> the
>> DW> current object mode.
>> DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done.
>>
>> DW> Now, of course, as a result of this 'munch' error the target,
>> DW> /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really
DW> created.
>>
>> DW> Another developer where I work claims that 'a quick search on google'
>> DW> implies that this is related to a 32- vs. 64-bit library issue--sort
DW> of
>> DW> implying that either my /informix/lib/esql libraries may not be
DW> 64-bit, or
>> DW> the way that I am building our application objects is incompatible
DW> with
>> DW> 64-bit ESQL libs. Or perhaps I should be statically linking rather
DW> than
>> DW> attempting to link with shared objects in /informix/lib/esql
DW> libraries.
>> DW> (However, our MAKEFILEs have not changed from previous versions of AIX
DW> and
>> DW> Visual Age--we have always built a shared object--not a static
DW> object.)
>>
>> Did this break when you upgraded from AIX 4.3.3 to 5.2? If so, I suspect
>> the Informix 64-bit libraries are old-style 64-bit libraries that are not
>> compatible with AIX 5.x.
DW> I am asking our IT department, but I am quite certain, since we just
DW> received this box (on behalf of one of our customers) from IBM, that
DW> everything is installed out-of-the-box. I do not believe that any software
DW> on the box is "upgraded" software. Unless part of an install requires you to
DW> install X, then upgrade to X+1... which seems really hoaky for a brand new
DW> box--but not outside the realm of possibility I suppose.
One way to be sure:
$ nm -X64 /informix/lib/esql/libifsql.so
If that returns an error, my hunch was correct. Otherwise,
I don't know; wait for Gary Hook to respond. :-)
Regards,
Nicholas
--
"Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html
"Meanings are another story." http://www.ifas.org/wa/glossolalia.html
"Nicholas Dronen" <ndronen@io.frii.com> wrote in message
news:3ef21302$0$205$75868355@news.frii.net...
> In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote:
>
> DW> "Nicholas Dronen" <ndronen@io.frii.com> wrote in message
> DW> news:3ef1f7a1$0$197$75868355@news.frii.net...
> >> In comp.unix.aix Darrin Wolf <phreud@hotmail.com> wrote:
> >> DW> Question for the gurus out there--or at least anyone that knows
more
> DW> than I
> >> DW> do about AIX 5.2 and Visual Age 6.0!
> >>
> >> DW> I have run into an error message that I cannot really identify. I
> DW> really do
> >> DW> not know if it is AIX specific, or INFORMIX 64-bit specific, since
the
> DW> error
> >> DW> occurs when linking my application code to the INFORMIX ESQL libs.
> >>
> >> DW> Here is a paste of the error from a terminal console:
> >>
> >> DW> Compiling "rel.vjdinf72/dbifinf72.o" done.
> >> DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so ...
> >>
> >> [ snip ]
> >>
> >> DW> munch: The input file /informix/lib/esql/libifsql.so is not valid
in
> DW> the
> >> DW> current object mode.
> >> DW> Creating /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so done.
> >>
> >> DW> Now, of course, as a result of this 'munch' error the target,
> >> DW> /testinf/viaware/htool/vjd/vjd143/lib/vjdinf72.so, is never really
> DW> created.
> >>
> >> DW> Another developer where I work claims that 'a quick search on
google'
> >> DW> implies that this is related to a 32- vs. 64-bit library
issue--sort
> DW> of
> >> DW> implying that either my /informix/lib/esql libraries may not be
> DW> 64-bit, or
> >> DW> the way that I am building our application objects is incompatible
> DW> with
> >> DW> 64-bit ESQL libs. Or perhaps I should be statically linking rather
> DW> than
> >> DW> attempting to link with shared objects in /informix/lib/esql
> DW> libraries.
> >> DW> (However, our MAKEFILEs have not changed from previous versions of
AIX
> DW> and
> >> DW> Visual Age--we have always built a shared object--not a static
> DW> object.)
> >>
> >> Did this break when you upgraded from AIX 4.3.3 to 5.2? If so, I
suspect
> >> the Informix 64-bit libraries are old-style 64-bit libraries that are
not
> >> compatible with AIX 5.x.
>
> DW> I am asking our IT department, but I am quite certain, since we just
> DW> received this box (on behalf of one of our customers) from IBM, that
> DW> everything is installed out-of-the-box. I do not believe that any
software
> DW> on the box is "upgraded" software. Unless part of an install requires
you to
> DW> install X, then upgrade to X+1... which seems really hoaky for a brand
new
> DW> box--but not outside the realm of possibility I suppose.
>
> One way to be sure:
>
> $ nm -X64 /informix/lib/esql/libifsql.so
Ah the nm utility. I have not used this before! Thanks for the tip. This
is definately a 64-bit object, so now I am down to figuring out if I am
somehow building by application objects in 32-bit mode! (E-r-r-r!)
Check this out:
$ nm -X32 /informix/lib/esql/libifsql.so0654-210 /informix/lib/esql/libifsql.so is not valid in the current object
file mode.
Use the -X option to specify the desired object mode.
and when I run: nm -X64 /informix/lib/esql/libifsql.so, I get a huge list
of 4584 symbols. So I think it is safe to assume that my
/informix/lib/esql/libifsql.so is indeed a 64-bit object. Time to use nm on
all of my application objects that are being linked with
/informix/lib/esql/libifsql.so here, to see if they are all 32-bit objects,
and I did not give correct compiler options when I built them?? H-m-m-m. I
will post whatever I figure out.
Thanks, you have definately been helpful! -Darrin
>
> If that returns an error, my hunch was correct. Otherwise,
> I don't know; wait for Gary Hook to respond. :-)
>
> Regards,
>
> Nicholas
>
> --
> "Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html
> "Meanings are another story." http://www.ifas.org/wa/glossolalia.html