This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Coreutils' Build Fails After Linking rm.exe--Solved

L Anderson wrote:
I'm trying to build coreutils and I've run into a problem that has me
puzzled. I'd greatly appreciate any ideas or pointers on what might be
causing the problem and steps I could take to figure it out. The
problem is repeatable, stopping at the exact same place.

I'm running 'XpProSp3', 'cygcheck -c' shows all OK.

1st--I used setup to install 'coreutils-8.10-1' source and placed the
files in '/usr/src/coreutils-8.10-1'

2nd--From that directory, I did 'cygport coreutils-8.10-1 prep', which
completed successfully.

3rd--I ran 'cygport coreutils-8.10-1 compile', which appeared to work
ok until it exited with a "make error" as shown by the following last
few lines of the output:

CCLD pwd.exe
CCLD readlink.exe
CCLD rm.exe
CCLD rmdir.exe <<<---up to and including rmdir.exe have been linked
./rm: ./rm: cannot execute binary file
make[3]: *** [runcon.exe] Error 126 <<<--runcon.exe and on, not linked
make[3]: *** Waiting for unfinished jobs....
./rm: ./rm: cannot execute binary file
make[3]: *** [seq.exe] Error 126
make[3]: Leaving directory
make[2]: *** [all] Error 2
make[2]: Leaving directory
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
make: *** [all] Error 2
*** ERROR: make failed

The above is output from 'make', chewing on the following 'makefile' lines:

@rm -f pwd$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pwd_OBJECTS) $(pwd_LDADD) $(LIBS)
readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES)
@rm -f readlink$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS)
@rm -f rm$(EXEEXT)
rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES)
@rm -f rmdir$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS)
runcon$(EXEEXT): $(runcon_OBJECTS) $(runcon_DEPENDENCIES)
@rm -f runcon$(EXEEXT) <<<-----error occurs at this point<<--
$(AM_V_CCLD)$(LINK) $(runcon_OBJECTS) $(runcon_LDADD) $(LIBS)
@rm -f seq$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(seq_OBJECTS) $(seq_LDADD) $(LIBS)

I think I figured it out! I had `.' in my path and it came before `/bin'. Consequently, while 'rm.exe' was being linked in the build directory(`.'), bash, searching it first while trying to execute @rm -f runcon$(EXEEXT), found 'rm.exe' but it was busy being built. Hence, the slight variation in the error messages I got at that point. Removing `.' from the search path, where it shouldn't have been in the first place, solved the problem.

I have now successfully build coreutils!

Sorry for all the noise.


Lowell Anderson

-- Problem reports: FAQ: Documentation: Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]