Operating System - HP-UX
1748040 Members
4940 Online
108757 Solutions
New Discussion юеВ

Re: problems generating exe file

 
SOLVED
Go to solution
Eder Urruela
Frequent Advisor

problems generating exe file

Hello!

I have started many threads about problems compiling an old code made for PA-RISC in integrity, I think finally I have solve all the problems ralated with computer architecture, but now I have the following problems, when I link the libraries I have generated in order to make the final exe.

../../lib/libZtddServ.a ../../lib/libZt.a \
/obras/master/IHM/VI/lib/libcgInterface.a \
../../lib/libXwnlio.a ../../lib/libXw.a ../../lib/libXtR2.a -lX1
1 -lm
ld: Unsatisfied symbol "IS_FCN_PTR" in file ../../lib/libZt.a[callback.o]
ld: Unsatisfied symbol "XtStrings" in file ../../lib/libZtddServ.a
ld: Unsatisfied symbol "IS_INT8_PTR" in file ../../lib/libZt.a[prm.o]
ld: Unsatisfied symbol "IS_UINT16_PTR" in file ../../lib/libZt.a[color.o]
ld: Unsatisfied symbol "__1kanji" in file ../../lib/libIVIbuild.a[liberror.o]
ld: Unsatisfied symbol "XtWindowOfObject" in file ../../lib/libZtddServ.a
ld: Unsatisfied symbol "IS_REAL64_PTR" in file ../../lib/libZt.a[filledge.o]
ld: Unsatisfied symbol "XtShellStrings" in file ../../lib/libZtddServ.a
ld: Unsatisfied symbol "IS_STRUCT_PTR" in file ../../lib/libZt.a[callback.o]
ld: Unsatisfied symbol "IS_INT32_PTR" in file ../../lib/libZt.a[callback.o]
10 errors.
*** Error exit code 1

I don't undertand why I have this problems because all these "Unsatisfied symbols" are defined in the .c and .h file which I used to compile the libraries.

Thanks!
25 REPLIES 25
Dennis Handly
Acclaimed Contributor
Solution

Re: problems generating exe file

>all these "Unsatisfied symbols" are defined in the .c and .h file which I used to compile the libraries.

Are they in your libs?
nm -pxAN ../../lib/lib* | grep -e S_FCN_PTR -e IS_UINT16_PTR

Do you have the archive libs in the right order? (You can use -Wl,+n to keep searching.)
Eder Urruela
Frequent Advisor

Re: problems generating exe file

>Are they in your libs?

Yes they are in my libraries, all o them.
But I have discovered that the symbols like IS_FCN_PTR, IS_INT8_PTR and these, aren't defined, because I haven't inlcude one the hp9000s800, one define which is related with the arquitecture but it seems to be necesary not for the compilation, but yes for the linking.
I can remake the library libZt.a, but I don't where is defined the XtStrings and all the symbols related with. I have found one declaration in StringDef.h
extern _XtStringDefs_h_Const char XtStrings[];
but i don't know.

Thanks again!
Eder Urruela
Frequent Advisor

Re: problems generating exe file

Adding the -D9000s800 in the Makefiles of the library libZt.a I have got to solve most of the error I had.

The ones I have now are the following:

cc -L /usr/lib/X11R6 -o ../../bin/ivibuild ivibuild.o cgPonerBPR.o ../../lib/libIVIbuild.a \
../../lib/libZtddServ.a ../../lib/libZt.a \
/obras/master/IHM/VI/lib/libcgInterface.a \
../../lib/libXwnlio.a ../../lib/libXw.a ../../lib/libXtR2.a -lX11 -lm
ld: Unsatisfied symbol "XtStrings" in file ../../lib/libZtddServ.a
ld: Unsatisfied symbol "__1kanji" in file ../../lib/libIVIbuild.a[liberror.o]
ld: Unsatisfied symbol "XtWindowOfObject" in file ../../lib/libZtddServ.a
ld: Unsatisfied symbol "XtShellStrings" in file ../../lib/libZtddServ.a
4 errors.
*** Error exit code 1

Stop.

I supose I could solve these problems adding one define to the obslote Makefile, but I don't Know where I should look for it.
I Know the Xt[somthing) are related with the graffics programming.

Thanks again!
Dennis Handly
Acclaimed Contributor

Re: problems generating exe file

Adding -D9000s800 is probably wrong since you aren't on a PA-RISC (9000) machine.

__1kanji seems to only appear in PA libc. This was probably obsoleted long ago. Where are you referencing this symbol?

Using that "nm -pxAN", you can search system directories. XtShellStrings is defined in /usr/lib/hpux32/libXt.so, -lXt.
Eder Urruela
Frequent Advisor

Re: problems generating exe file

>Adding -D9000s800 is probably wrong since you aren't on a PA-RISC (9000) machine

I Know that it isn't the ideal option but I have ten following code in one include whisch is asked in many source files:

#ifdef hp9000s800
#define REV_STACK 1

#define IS_INT8_PTR(addr) (TRUE)
#define IS_UINT8_PTR(addr) (TRUE)

#define IS_INT16_PTR(addr) (((unsigned)addr & 0x00000001) == 0)
#define IS_UINT16_PTR(addr) (((unsigned)addr & 0x00000001) == 0)

#define IS_INT32_PTR(addr) (((unsigned)addr & 0x00000003) == 0)
#define IS_UINT32_PTR(addr) (((unsigned)addr & 0x00000003) == 0)
#define IS_REAL32_PTR(addr) (((unsigned)addr & 0x00000003) == 0)
#define IS_PTR_PTR(addr) (((unsigned)addr & 0x00000003) == 0)
#define IS_FCN_PTR(addr) (((unsigned)addr & 0x00000001) == 0)
/* On the 800, structures are either 2, 4 or 8 byte aligned depending on
* their contents. The following checks for 4 byte aligned because all of
* our structures start with a 4 byte aligned element. If this is used for
* any other structures, something will have to happen.
*/
#define IS_STRUCT_PTR(addr) (((unsigned)addr & 0x00000003) == 0)

#define IS_REAL64_PTR(addr) (((unsigned)addr & 0x00000007) == 0)
#endif hp9000s800

this file is calles host.h and It doesn't have defines for modern architectures and it necesary for the compilation

__1kanji seems to only appear in PA libc. This was probably obsoleted long ago. Where are you referencing this symbol?


This defines is a mistery by the moment.

And usig the nm -pxAN command I have found where the Xt elements are an I have discovered that the Makefile gives the old libraries to the cc which haven't have defined the XtStrings XtWindowOfObject an the XtShellStrings, so I have change them for the new libraries an now appears new compilation errors.

That's a conviction...

Thanks for your ideas.

Dennis Handly
Acclaimed Contributor

Re: problems generating exe file

>#define REV_STACK 1

Did you change this to a 1 for IPF?

These are all bogus and aren't valid for 64 bit:
==========================================================
#define IS_INT16_PTR(addr) (((unsigned long)addr & (sizeof(short) -1UL)) == 0)
#define IS_UINT16_PTR(addr) (((unsigned long)addr & (sizeof(unsigned short) -1UL)) == 0)

#define IS_INT32_PTR(addr) (((unsigned long)addr & (sizeof(int) -1UL)) == 0)
#define IS_UINT32_PTR(addr) (((unsigned long)addr & (sizeof(unsigned int) -1UL)) == 0)
#define IS_REAL32_PTR(addr) (((unsigned long)addr & (sizeof(float) -1UL)) == 0)
#define IS_PTR_PTR(addr) (((unsigned long)addr & (sizeof(void*) -1UL)) == 0)
#define IS_FCN_PTR(addr) (((unsigned long)addr & (sizeof(long long) -1UL)) == 0)
#define IS_STRUCT_PTR(addr) (((unsigned long)addr & (sizeof(int) -1UL)) == 0)
#define IS_REAL64_PTR(addr) (((unsigned long)addr & (sizeof(double) -1UL)) == 0)

>This defines is a mystery by the moment.

Just grep your sources and includes for __1kanji.

>now appears new compilation errors.

Which are?
Eder Urruela
Frequent Advisor

Re: problems generating exe file

>>#define REV_STACK 1

>Did you change this to a 1 for IPF?

No I haven't done any change, all this code is the original source.

>These are all bogus and aren't valid for 64 bit:

So I should change the defines I have for these ones.

>>now appears new compilation errors.

>Which are?
The mistakes are related with the change of the libraris, now are requires new #includes, because the Makefile gave to the compiler a path with the old libraries.
I have found this libraries in /usr/include/X11 | /usr/include/Xm | /usr/include/Xw directories.
I'm adding this paths, and replacing old libraries with the new ones, but there are somo old libraries which I think are neccesry.
I'm purging the compilation errors little by little, I don't post this list because is too long.
But I attach the last list
Eder Urruela
Frequent Advisor

Re: problems generating exe file

One of the more frequent error are related with te declaration of the fuction which seem to havo less parameter than the old ones.

"Cascade.c", line 397: error #2140: too many arguments in function call
menubutton_class.idealWidthProc))(menuButton, &idealWidth);
^

"Cascade.c", line 823: error #2140: too many arguments in function call
paneManagedChildren) (grandparent, mw);
^

I suposse the parameter which now aren't necesary should be removed, but I'm worried about other problems could apear from those, the idealWidth may be use for control something that now could be controlled by other function, or something similar.

I think that actualizing the *.h files it's a bit "dangerous"

Thanks again!
Dennis Handly
Acclaimed Contributor

Re: problems generating exe file

>No I haven't done any change, all this code is the original source.

Then you should set it to 0:
#define REV_STACK 0
Or remove the definition. The stack on IPF grows in reverse, the opposite of PA.

>So I should change the defines I have for these ones.

Most of the values are the same except for IS_FCN_PTR & IS_PTR_PTR.

>One of the more frequent error are related with the declaration of the function which seem to have less parameter than the old ones.

Hmm, I guess this new version is very different.