[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[condor-users] examples won't compile [CC and F77 fixed, C++ still fails]

Hi all,

I am very new at condor.
I tried to condor_compile the examples in the example directory.
It goes wrong with the following errors:

LINKING FOR CONDOR : /usr/bin/ld -Bstatic --eh-frame-hdr -m elf_i386 
nker /lib/ld-linux.so.2 -o env.remote /opt/condor/lib/condor_rt0.o /usr/lib/
gcc-lib/i486-suse-linux/3.3/../../../crti.o /usr/lib/gcc-lib/
beginT.o -L/opt/condor/lib -L/usr/lib/gcc-lib/i486-suse-linux/3.3 -L/usr/lib/
gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/lib -L/usr/lib/
-suse-linux/3.3/../../.. /tmp/cc2ju66x.o --start-group -lnss_files -lnss_dns 
-lresolv --end-group /opt/condor/lib/libcondorzsyscall.a /opt/condor/lib/
libz.a /op
t/condor/lib/libcomp_libstdc++.a /opt/condor/lib/libcomp_libstdc++.a -lm -lc /
opt/condor/lib/libcomp_libgcc.a /opt/condor/lib/libcomp_libgcc_eh.a -lc /opt/
r/lib/libcomp_libgcc.a /opt/condor/lib/libcomp_libgcc_eh.a /usr/lib/gcc-lib/
i486-suse-linux/3.3/crtend.o /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../
/opt/condor/lib/libcondorzsyscall.a(condor_file_agent.o)(.text+0x250): In 
function `CondorFileAgent::open(char const*, int, int)':
/home/condor/execute/dir_27063/src/condor_ckpt/condor_file_agent.C:99: the use 
of `tmpnam' is dangerous, better use `mkstemp'
/opt/condor/lib/libc.a(nsswitch.o)(.data+0x64): In function 
nsswitch.c:115: undefined reference to `_nss_files_getaliasent_r'
externals/build/glibc-2.2.93/glibc-2.2.93/nss/nsswitch.c:114: undefined 
`_nss_files_endaliasent'                                                     /


I found an article on:

and i changed the Makefile  as follows
CC = gcc
C++ = g++
F77 = g77
CC_ARGS=-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv -Wl,--end-group

all: c fortran c++

c++: env.remote fstream.remote

c: io.remote loop.remote registers.remote

fortran: printer.remote reader.remote fortIO.remote

        /bin/rm *.remote *.out *.err *.log *.output core* tmp

io.remote: io.c
        condor_compile $(CC) -o io.remote io.c ${CC_ARGS}

loop.remote: loop.c
        condor_compile $(CC) -o loop.remote loop.c ${CC_ARGS}

registers.remote: registers.c
        condor_compile $(CC) -o registers.remote registers.c ${CC_ARGS}

reader.remote: reader.f
        condor_compile $(F77) -o reader.remote reader.f ${CC_ARGS}

printer.remote: printer.f
        condor_compile $(F77) -o printer.remote printer.f ${CC_ARGS}

fortIO.remote: fortIO.f
        condor_compile $(F77) -o fortIO.remote fortIO.f ${CC_ARGS}

env.remote: env.C
        condor_compile $(C++) -o env.remote env.C ${CC_ARGS}

fstream.remote: fstream.C
        condor_compile $(C++) -o fstream.remote fstream.C ${CC_ARGS}

Now it compiles the cc and the f77 programs, but it fails the compile on the 
g++ programma's

I am sure i am not the first one to hit this problem, i found it a couple of 
times in the archive, 
but never with a solution.

Anyone with a good solution ?!?!

The following is not an error but a warning:
"the use of `tmpnam' is dangerous, better use `mkstemp' "
But i like code to compile cleanly.
Is there a fix for this "warning"?

All help is kindly apreciated.
Kind regards,

Condor Support Information:
To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with
unsubscribe condor-users <your_email_address>