From pdalgd at gmail.com  Fri Nov 27 17:25:14 2015
From: pdalgd at gmail.com (peter dalgaard)
Date: Fri, 27 Nov 2015 17:25:14 +0100
Subject: [Rd] compile question
In-Reply-To: <5658760A.5000609@gmail.com>
References: <56535263.4010706@gmail.com> <56538588.40006@gmail.com>
	<81EBBC68-83B0-4843-8236-B9141EAA8988@gmail.com>
	<56570B3C.7060108@gmail.com>
	<C2C8DD43-95A4-4207-B124-088C1431C4AF@gmail.com>
	<5658760A.5000609@gmail.com>
Message-ID: <1F0262C8-F669-4AE3-9F39-14AD8880C1C8@gmail.com>


On 27 Nov 2015, at 16:26 , Michael Felt <aixtools at gmail.com> wrote:

> On 2015-11-26 17:15, peter dalgaard wrote:
>> If you do want to play with maintainer-mode, first check out
>> 
>> https://developer.r-project.org/R-build-prerelease
>> 
>> it is what is done in the nightly builds on OSX. (Actually Mavericks. The comment is old.)
>> 
>> -pd
>> 
> Very helpful.
> I only ran the "sync", aclocal and autoconf commands - so what else (extra) does 'maintainer-mode' do? On AIX I could think of adding -Wl,-b:map=${object}.map (one of my new tricks for finding which library is going to be used).


The easiest way to find out is to look through the Makefile.in-s for lines with @MAINTAINER_MODE_TRUE at . E.g. in  src/include/Makefile.in 

$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-h.in
$(srcdir)/stamp-h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(top_builddir)/aclocal.m4
        @TBD=`cd $(top_builddir); pwd`; \
          cd $(top_srcdir) && $(AUTOHEADER) -I $${TBD}
        @$(ECHO) timestamp > $@ 2> /dev/null

(which I think is what bit you via a missing "autoheader" command). It usually boils down to disabling certain dependencies.)

Notice that in maintainer-mode, the build _will_ (sometimes) modify files under $(top_srcdir), even if building in a separate directory. That is otherwise a big no-no, which is essentially why it is reserved for maintainers. (And the nightly builds try to ensure that not all even maintainers will be modifying certain source files. The tools for making them are somewhat flaky, and we don't all have the appropriate versions.)  


> 
> Other comments/questions:
> 
> a) the small change in configure.ac got rid of a lot of error/rather warning messages from the binder (ld: 0711-224 WARNING: Duplicate symbol:.myFavSymbol)
> b) lost of ld warnings are going to be more difficult to resolve - as they are being generated by the autoconf processing of gfortran -v - and the placement of XXX_LIBADD flags (basically, in the way now - still looking at where they get placed - are there "switches" for Makefile.in processing?
> c) looking backward and forward - a hint on where to look is appreciated. In one of the m4 files /usr/local/include is defined as the default include directory. However, it does not actually use ${prefix}/include which is what I would want. the looking backward part - a month ago when I was working with R to get it ready for a project (and then 32-bit was too small a memory model) - while compiling and installing additional packages I was forced to use /usr/local/lib and /usr/local/include. Would like to get away from that, if possible.
> d) the biggest bother of all ;-| - a bug in AIX, and an undefined symbol in /usr/lib/libm.a - You can look for a LONG time, and never get further when an error like that sneaks in with an update!

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] compile question
peter dalgaard