Operating System - HP-UX
1753297 Members
6925 Online
108792 Solutions
New Discussion юеВ

Make command help. Exe are not created in right size

 
SOLVED
Go to solution
vaish
Frequent Advisor

Re: Make command help. Exe are not created in right size

I tried with : CXXFLAGS=-g -z -I$(BOOSTINCL) -threads also

Getting errors like
gcc: unrecognized option `-threads'
/usr/ccs/bin/ld: Unsatisfied symbols: ....

If possible , help me please

Thanks
Vaish
Dennis Handly
Acclaimed Contributor

Re: Make command help. Exe are not created in right size

>CXX=gcc
>ld: Unsatisfied symbols:

This is the C compiler. You need: CXX=g++

>gcc: unrecognized option `-threads'

Oops, my man page was broken. All other OS versions showed -pthread vs -thread.
vaish
Frequent Advisor

Re: Make command help. Exe are not created in right size

Dennis,
I have changed to g++ in my make file as the following ...
CXX=/usr/local/appl/gcc-3.4.2/bin/g++
CC=/usr/local/appl/gcc-3.4.2/bin/g++
#CXXFLAGS=-AA -mt -c -g0 +objdebug -z -I$(BOOSTINCL) +W823 $(MK_CXXOPTS)
CXXFLAGS=-threads -g -I$(BOOSTINCL)

But I see the following error ...
$mymachine: mk
$::ENV{'MK_ROOT'} = "/vobs/source"
$::ENV{'SHAREVOB'} = "/vobs/share"
Disabling winkin of derived objects outside of current view
/usr/atria/bin/clearmake -C gnu -V
/usr/local/appl/gcc-3.4.2/bin/g++ -threads -g -I/usr/local/appl/boost -I
/vobs/allap/ap_format/incl -I/vobs/allap/incl -I/vobs/share/incl -o /vobs/allap/
ap_format/obj/ap_format.o /vobs/allap/ap_format/src/ap_format.C
g++: unrecognized option `-threads'
/usr/ccs/bin/ld: Unsatisfied symbols:
FormatMessage::formessg1() (first referenced in /var/tmp//ccHNXrSE.o)
(code)
FormatMessage::formessg2() (first referenced in /var/tmp//ccHNXrSE.o) (code)
Fcif::toString() const(first referenced in /var/tmp//ccHNXrSE.o) (code)
p1Daemon::report(std::basic_string, std::allocator > const&, int, int)(first referenced in /var/tmp//ccHNXrSE.o) (code)
.....
FormatMessage::formessg3() (first referenced in /var/tmp//ccHNXrSE.o) (code)
collect2: ld returned 1 exit status
*** Error code 1
clearmake: Error: Build script failed for "/vobs/source/obj/myobj.o"

Can you please help me to modify the CXXflag correctly ?

Thanks
Vaish
Dennis Handly
Acclaimed Contributor

Re: Make command help. Exe are not created in right size

CXXFLAGS=-threads -g -I$(BOOSTINCL)

As I mentioned before, change -threads to -pthread.

>Can you please help me to modify the CXXFLAGS correctly?

I don't think the above change will fix these unsats? If it doesn't, have you forgotten to recompile everything with g++? The mangling is different between the two PA compilers.
Dennis Handly
Acclaimed Contributor

Re: Make command help. Exe are not created in right size

CC=/usr/local/appl/gcc-3.4.2/bin/g++

The C command should be gcc, not g++
(Not sure this is the issue.)
vaish
Frequent Advisor

Re: Make command help. Exe are not created in right size

/usr/ccs/bin/ld: Unsatisfied symbols is still there after modifying thread to -pthread and also to gcc.

The code is not compiled. It throws the same error.
Peter Nikitka
Honored Contributor

Re: Make command help. Exe are not created in right size

Hi,

you try to compile and link his single file ap_format.C

Does it really contain all of the functions/classes like
FormatMessage::
Fcif::
p1Daemon::

I assume you need to compile + link more than this single file:
- you need an application library to link against
- you need to compile more .C files


I don't think, this current problem is a problem of the linker but a problem of the deps of this piece of SW.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Dennis Handly
Acclaimed Contributor

Re: Make command help. Exe are not created in right size

(Skip the first part, I think Peter has the solution.)

>The code is not compiled. It throws the same error.

You have several choices depending on your skill levels:
1) Go back to aC++, that links. Get out your debugger and find out why isn't working as expected.

2) Spend weeks going though the C++ sources to figure out where symbols used in ccHNXrSE.o are defined.

Note: After solving 2), you still may get the isn't working as expected issue??

3) You could use aC++ to find where those functions are defined and used. And see why that isn't the case for g++.

If you can attach the aC++ ccHNXrSE.o, I can look at it.
Also, the next step would be to compile that .C with aCC and add "-E -.i" and attach ccHNXrSE.i.

>Peter: I don't think, this current problem is a problem of the linker but a problem of the deps of this piece of SW.

You are absolutely right. The "-c" shouldn't have been removed from CXXFLAGS.

(Of course this is broken. The -c should be in the build rules, not the flags.)