Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Christopher Faylor
On Thu, Nov 07, 2013 at 11:20:15AM +1100, Shaddy Baddah wrote:
>As the OP has suggested in a recent post in their "Building a snapshot"
>thread, the problem is that there is a mix in methods to locating
>xidepend, whereby it is referenced via a relative dir path which would
>be direct.
>
>Only that there is a change of directory beforehand to which the
>relative dir path is no longer applicable, and this causes error. For me
>this was happening with a separate build dir, but I suspect that it
>would happen regardless, as the winsup/doc subpath lives under the
> subdir that is created exclusively for the build
>anyway.
>
>In-lining that patch will make that clearer:
>
>
>--- a/winsup/doc/Makefile.in
>+++ b/winsup/doc/Makefile.in
>@@ -91,6 +91,6 @@ cygwin-docs.tar.bz2 : $(TBFILES) $(TBDEPS)
>  Makefile.dep: cygwin-ug-net.xml
> builddir=`pwd` \
> && cd $(srcdir) \
>-   && $(srcdir)/xidepend $^ > "$${builddir}/$@"
>+   && ./xidepend $^ > "$${builddir}/$@"
>
>  -include Makefile.dep
>
>Beyond that, I also experienced the (minor) fop issue, and did not
>persevere. As I did not need the documentation to be built.

Your patch is correct.  I just checked in a variation of it along with
reinstating the "build in doc errors are ignored" behavior.

Many GNU projects deprecate using relative paths to the source
directory, probably just for problems like this.  However, it's
always been possible in Cygwin so it should remain possible.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Shaddy Baddah

Hi,

On Nov 07 00:47, Corinna Vinschen wrote:

On Nov 06 02:37, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

It'd still be very interesting to know an opinion of the CYGWIN gurus
about this trouble that I asked yesterday (thanks to Marco, I now know
that the original ELF error is benign):


make[3]: Entering directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
cygwin/winsup/doc'
builddir=`pwd` \
&& cd ../../.././winsup/doc \
&& ../../.././winsup/doc/xidepend ../../.././winsup/doc/cygwin-ug-net.xml >
"${builddir}/Makefile.dep"
/bin/sh: line 2: ../../.././winsup/doc/xidepend: No such file or directory
make[3]: *** No rule to make target `Makefile.dep', needed by `all'.  Stop.
make[3]: Leaving directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
cygwin/winsup/doc'


I noticed this recently too. I think it's just a bit of oversight with a
recent check-in to CVS.

I've attached a patch that should fix this for the winsup module.


Nope.  We don't support building within the source dir.  If you build in
a separate build dir, which you should do anyway, xidepend is guaranteed
to be not in .


Sorry, the patch is meant to be for the "build in a separate build dir"
method too.

As the OP has suggested in a recent post in their "Building a snapshot"
thread, the problem is that there is a mix in methods to locating
xidepend, whereby it is referenced via a relative dir path which would
be direct.

Only that there is a change of directory beforehand to which the
relative dir path is no longer applicable, and this causes error. For me
this was happening with a separate build dir, but I suspect that it
would happen regardless, as the winsup/doc subpath lives under the
 subdir that is created exclusively for the build
anyway.

In-lining that patch will make that clearer:


--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -91,6 +91,6 @@ cygwin-docs.tar.bz2 : $(TBFILES) $(TBDEPS)
 Makefile.dep: cygwin-ug-net.xml
builddir=`pwd` \
&& cd $(srcdir) \
-   && $(srcdir)/xidepend $^ > "$${builddir}/$@"
+   && ./xidepend $^ > "$${builddir}/$@"

 -include Makefile.dep

Beyond that, I also experienced the (minor) fop issue, and did not
persevere. As I did not need the documentation to be built.

--
Regards,
Shaddy


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Christopher Faylor
On Wed, Nov 06, 2013 at 03:20:55PM +, Lavrentiev, Anton (NIH/NLM/NCBI) [C] 
wrote:
>> See the FAQ: 
>
>I see, thanks Larry!  There's a Readme file at the top level of
>the snapshot tar ball, which I glanced at, and saw the usual
>"./configure; make" sequence even though now when I looked more
>closely, the file is just something generic to GNU, not particularly
>to CYGWIN.  Not sure what it is doing there -- but certainly not helping
>(esp. for the first-timers)...

I'm not sure how you translate not building in the source directory to
"the configure file is not supposed to be used".

The configure script isn't generic.  It's intended for building Cygwin.

Once again: YOU ARE NOT SUPPOSED TO BUILD IN THE SOURCE DIRECTORY.

That means you don't do this:

1) Unpack tarball.

2) cd to unpacked directory.

3) ./configure

You need to create a separate build directory and run configure there.
This is standard GNU stuff.  Nothing Cygwin specific here.

If this is still confusing then you probably shouldn't be attempting to
build from source at all.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> See the FAQ: 

I see, thanks Larry!  There's a Readme file at the top level of
the snapshot tar ball, which I glanced at, and saw the usual
"./configure; make" sequence even though now when I looked more
closely, the file is just something generic to GNU, not particularly
to CYGWIN.  Not sure what it is doing there -- but certainly not helping
(esp. for the first-timers)...

Anton Lavrentiev
Contractor NIH/NLM/NCBI


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Larry Hall (Cygwin)

On 11/6/2013 9:35 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

We don't support building within the source dir.


That's unclear to me.  I just did "./configure" then "make" at
the top snapshot directory.  AFAICT, the build result was stored
under ./i868-pc-cygwin.


See the FAQ: 
That should clarify what not building in the source directory means.


--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> We don't support building within the source dir.

That's unclear to me.  I just did "./configure" then "make" at
the top snapshot directory.  AFAICT, the build result was stored
under ./i868-pc-cygwin.

> xidepend is guaranteed to be not in.

Well, that is even more confusing.  If it not supposed to be in,
why to call it at all?

Anton Lavrentiev
Contractor NIH/NLM/NCBI



Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Corinna Vinschen
On Nov  7 00:31, Shaddy Baddah wrote:
> Hi,
> 
> On Nov 06 02:37, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> >It'd still be very interesting to know an opinion of the CYGWIN gurus
> >about this trouble that I asked yesterday (thanks to Marco, I now know
> >that the original ELF error is benign):
> >
> >>make[3]: Entering directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
> >>cygwin/winsup/doc'
> >>builddir=`pwd` \
> >>&& cd ../../.././winsup/doc \
> >>&& ../../.././winsup/doc/xidepend ../../.././winsup/doc/cygwin-ug-net.xml >
> >>"${builddir}/Makefile.dep"
> >>/bin/sh: line 2: ../../.././winsup/doc/xidepend: No such file or directory
> >>make[3]: *** No rule to make target `Makefile.dep', needed by `all'.  Stop.
> >>make[3]: Leaving directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
> >>cygwin/winsup/doc'
> 
> I noticed this recently too. I think it's just a bit of oversight with a
> recent check-in to CVS.
> 
> I've attached a patch that should fix this for the winsup module.

Nope.  We don't support building within the source dir.  If you build in
a separate build dir, which you should do anyway, xidepend is guaranteed
to be not in .


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


pgpeZfvwZwlnX.pgp
Description: PGP signature


Re: Building a snapshot ("Not an ELF file" error)

2013-11-06 Thread Shaddy Baddah

Hi,

On Nov 06 02:37, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:

It'd still be very interesting to know an opinion of the CYGWIN gurus
about this trouble that I asked yesterday (thanks to Marco, I now know
that the original ELF error is benign):


make[3]: Entering directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
cygwin/winsup/doc'
builddir=`pwd` \
&& cd ../../.././winsup/doc \
&& ../../.././winsup/doc/xidepend ../../.././winsup/doc/cygwin-ug-net.xml >
"${builddir}/Makefile.dep"
/bin/sh: line 2: ../../.././winsup/doc/xidepend: No such file or directory
make[3]: *** No rule to make target `Makefile.dep', needed by `all'.  Stop.
make[3]: Leaving directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
cygwin/winsup/doc'


I noticed this recently too. I think it's just a bit of oversight with a
recent check-in to CVS.

I've attached a patch that should fix this for the winsup module.

--
Regards,
Shaddy



xidepend.patch.gz
Description: GNU Zip compressed data
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

RE: Building a snapshot ("Not an ELF file" error)

2013-11-05 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Hello List,

It'd still be very interesting to know an opinion of the CYGWIN gurus
about this trouble that I asked yesterday (thanks to Marco, I now know
that the original ELF error is benign):

> make[3]: Entering directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
> cygwin/winsup/doc'
> builddir=`pwd` \
> && cd ../../.././winsup/doc \
> && ../../.././winsup/doc/xidepend ../../.././winsup/doc/cygwin-ug-net.xml >
> "${builddir}/Makefile.dep"
> /bin/sh: line 2: ../../.././winsup/doc/xidepend: No such file or directory
> make[3]: *** No rule to make target `Makefile.dep', needed by `all'.  Stop.
> make[3]: Leaving directory `/home/lavr/cygwin-snapshot-20130925-1/i686-pc-
> cygwin/winsup/doc'

TIA,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Building a snapshot ("Not an ELF file" error)

2013-11-04 Thread marco atzeri

Il 11/4/2013 6:13 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] ha scritto:

Hello All,

I'm using some recent (not the latest, though) CYGWIN release,
and trying to build a CYGWIN snapshot (for the first time)...

When I deployed the snapshot source, ran configure, then make, I saw this:

checking for .preinit_array/.init_array/.fini_array support... readelf: Error: 
Not an ELF file - it has the wrong magic bytes at the start
no

Does not look "good" to me, but other than the message, it does not
seem to cause any ill side-effects, either (just as yet, at least).


it could be a side effect of the platform used to build the snapshot.
Usually it is cross-build from Linux and not built on cygwin

On my build from CVS source on cygwin I see:
checking for .preinit_array/.init_array/.fini_array support... (cached) no



Is there something to worry about?  Like I said, I'm breaking new
grounds to me, and I am not familiar with any (known) peculiarities...

Thanks,


I presume no as the checking say "no" as on mine

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Building a snapshot ("Not an ELF file" error)

2013-11-04 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
> does not cause any ill side-effects, either (just as yet, at least).

Maybe I spoke too soon, or maybe it's not at all related, but my build
finally failed like this:

...
make[3]: Leaving directory 
`/home/lavr/cygwin-snapshot-20130925-1/i686-pc-cygwin/winsup/lsaauth'
make[3]: Entering directory 
`/home/lavr/cygwin-snapshot-20130925-1/i686-pc-cygwin/winsup/doc'
builddir=`pwd` \
&& cd ../../.././winsup/doc \
&& ../../.././winsup/doc/xidepend ../../.././winsup/doc/cygwin-ug-net.xml > 
"${builddir}/Makefile.dep"
/bin/sh: line 2: ../../.././winsup/doc/xidepend: No such file or directory
make[3]: *** No rule to make target `Makefile.dep', needed by `all'.  Stop.
make[3]: Leaving directory 
`/home/lavr/cygwin-snapshot-20130925-1/i686-pc-cygwin/winsup/doc'
Makefile:82: recipe for target `doc' failed
make[2]: *** [doc] Error 1
make[2]: Leaving directory 
`/home/lavr/cygwin-snapshot-20130925-1/i686-pc-cygwin/winsup'
Makefile:8381: recipe for target `all-target-winsup' failed
make[1]: *** [all-target-winsup] Error 2
make[1]: Leaving directory `/home/lavr/cygwin-snapshot-20130925-1'
Makefile:833: recipe for target `all' failed
make: *** [all] Error 2

The blamed binary is indeed there, and it looks like it's relative
nested location (../../.././winsup/doc/xidepend) has somehow been
miscalculated.

~/cygwin-snapshot-20130925-1
$ ls -l winsup/doc/xidepend
-rwxr-xr-x 1 lavr Domain Users 874 Jun  4 07:50 winsup/doc/xidepend

~/cygwin-snapshot-20130925-1
$ file winsup/doc/xidepend

What am I missing / doing wrong here?

TIA,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple