Operating System - HP-UX
1837407 Members
3469 Online
110116 Solutions
New Discussion

gcc failed on compiling ddd

 
Peter Li_6
New Member

gcc failed on compiling ddd

OS Version 11i (64 bit)

I installed gcc from gcc-3.2-sd-11.00.depot and can use this gcc to compile a simple C program. However, when I try to compile a large program like ddd, I get the following errors:
/usr/lib/dld.sl: Can't find path for shared library: libfl.sl
/usr/lib/dld.sl: No such file or directory
make[1]: *** [libreadline.a] IOT trap (core dumped)
make[1]: Leaving directory `/export/home/pli/ddd-3.3.1/readline'
make: *** [all-recursive] Error 1

I also tried to install gcc from this package: gcc-3.2-11.00.64.depot, and also failed (not the same error).

My questions are:
1. What's the difference between those two gcc compilers? Is one 32-bits and another 64-bits? For a 64 bits machine, which one is the right one I should use?
2. Any ideas why the compilation failed?

Thanks.
PeterLi
8 REPLIES 8
Anthony deRito
Respected Contributor

Re: gcc failed on compiling ddd

this may help...

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xba27543254bfd611abdb0090277a778c,00.html

go down to the bottom of the dialogue where they are apecifically talking about libfl.
H.Merijn Brand (procura
Honored Contributor

Re: gcc failed on compiling ddd

To avoid problems, always use the 32bit version of gcc, unless you *need* 64bit object (e.g. when linking to 64bit Oracle)

That the OS is 64bit, only indicates it's ability to run 64bit objects.

And - yes - gcc is /not/ able to switch between 32bit objects and 64bit objects. There are two different compilers to generate it.

This might also explain your first problem. gcc - in fact ld, but you don't see - is not able to find libfl.sl. *You* might be able to find it in /usr/lib, or /usr/local/lib, but if you are building 64bit objects, ld will not look there, but search /usr/lib/pa20_64 instead, where the chance of finding that specific library is much smaller.
Enjoy, Have FUN! H.Merijn
Peter Li_6
New Member

Re: gcc failed on compiling ddd

I installed flex-2.5.4a to this system. Now it passed previous failure point and failed on syntax errors:

In file included from hostname.C:75, from userinfo.C:54:
/usr/include/sys/socket.h:439: syntax error before `(' token
/usr/include/sys/socket.h:441: syntax error before `(' token
make[1]: *** [userinfo.o] Error 1
make[1]: Leaving directory `/export/home/pli/ddd-3.3.1/ddd'
make: *** [all-recursive] Error 1

Any ideas? Thanks.
PeterLi
Peter Li_6
New Member

Re: gcc failed on compiling ddd

The syntax error is reproduceable by a simple program hello.cc:

#include "sys/socket.h"
#include

int main (int argc,char *argv[])
{
printf( "Hello \n");
}

$ gcc hello.cc
In file included from hello.cc:1:
/usr/include/sys/socket.h:439: syntax error before `(' token
/usr/include/sys/socket.h:441: syntax error before `(' token

Any body can provide any help??? Thanks!
PeterLi
H.Merijn Brand (procura
Honored Contributor

Re: gcc failed on compiling ddd

What if you replace

#include "sys/socket.h"

with

#include

c++ is rather picky
Enjoy, Have FUN! H.Merijn
Peter Li_6
New Member

Re: gcc failed on compiling ddd

 
PeterLi
Zoltan Arpadffy
New Member

Re: gcc failed on compiling ddd

You need a flex package... it will provide libfl.sl etc.


Regards, Z
Stanimir
Trusted Contributor

Re: gcc failed on compiling ddd

Hi!
This message:"cannot find ... libfl.sl" means,
this library could not be found in any of search paths, given to dyn.loader.
so you can:
1.#find / -name libfl.sl
..
/Somedir/libfl.sl

Then: SHLIB_PATH=/Somedir
Then try compilation again.

2.Another possibility:
Look at install scripts and
add compilation option: #gcc -lfl

If you cannot find libfl.sl with "find" -
look for missed related products.
Regards,Stan.