stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <Travis.Vi...@roguewave.com>
Subject RE: ABI problem on Darwin (was: Re: [VOTE] stdcxx 4.2.1 release)
Date Tue, 29 Apr 2008 23:19:33 GMT
 

>Eric Lemings wrote:
>
>> Travis Vitek wrote:
>> 
>> >Travis Vitek wrote:
>> > 
>> >
>> >>Eric Lemings wrote:
>> >> 
>> >>Well I see one small problem already for which there is 
>> >>already a workaround.  The BUILDDIR variable is assigned a 
>> >>value in makefile.in but it isn't set in the -install_name 
>> >>option when linking the library for some odd reason.  In this 
>> >>case, the 4.2.0 workaround -- already documented I believe -- 
>> >>using DYDLD_LIBRARY_PATH is needed.
>> 
>> I didn't see that this was documented anywhere, but I did find some
>> conversation on the topic in the archives. You can peruse that thread
>> here [http://tinyurl.com/4saetr].
>> 
>> It looks like the original issue was never resolved. It seems 
>> to me that Martin is right, the build/test infrastructure should
>> be setting DYLD_LIBRARY_PATH for shared builds just as it does for 
>> LD_LIBRARY_PATH on other platforms.
>
>Slight problem with that.  The required change would have to be made to
>a makefile that does not currently contain platform dependencies.
>

The two files I found that would need changes [they referenced
LD_LIBRARY_PATH] were makefile.rules and GNUmakefile.cfg, both of which
have at least one platform specific block.

>Or we could just set DYLD_LIBRARY_PATH on all platforms
>though I doubt some will care for that.  :)
>

That is what was done in one of the cases in the run block of
GNUmakefile.cfg for LD_LIBRARY_PATH and LIBPATH. I don't see any
motivating reason to avoid doing the same.

In my testing that seems to work just fine. You might have a look at the
patch shown below.

Index: gcc.config
===================================================================
--- gcc.config	(revision 652071)
+++ gcc.config	(working copy)
@@ -93,16 +93,13 @@
     endif
 endif
 
-ifneq ($(OSNAME),Darwin)
+ifeq ($(OSNAME),Darwin)
     # no -shared option for GCC on Mac OS X (Darwin)
-    LDSOFLAGS = -shared
+    LDSOFLAGS  = -dynamiclib
+    LDSOFLAGS += -compatibility_version 4 -current_version $(LIBVER)
 else
     # Flags needed when linking the library
-    LDSOFLAGS = \
--dynamiclib \
--install_name $(BUILDDIR)/lib/$(LIBNAME) \
--compatibility_version 4 \
--current_version $(LIBVER)
+    LDSOFLAGS = -shared
 endif
 
 
Index: GNUmakefile.cfg
===================================================================
--- GNUmakefile.cfg	(revision 652071)
+++ GNUmakefile.cfg	(working copy)
@@ -249,9 +249,10 @@
                   test -f $$file.o -a ! $$? -eq 0 ;
\
               else
\
                   echo "./$$file" >>$(LOGFILE) ;
\
+                  DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH:. ;
\
                   LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:. ;
\
                   LIBPATH=$$LIBPATH:. ;
\
-                  export LIBPATH LD_LIBRARY_PATH ;
\
+                  export LIBPATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH;
\
                   text=`./$$file` ;
\
               fi;
\
               res=$$? ;
\
Index: makefile.rules
===================================================================
--- makefile.rules	(revision 652071)
+++ makefile.rules	(working copy)
@@ -135,7 +135,9 @@
 
 # produce a .out file by running the executable
 %.out: %
-	LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR) ./$< >$@ 2>&1
+	LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR)
\
+        DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH:$(LIBDIR)
\
+        ./$< >$@ 2>&1
 
 # create a script that when run first builds the executable and then
runs it
 # done to save even more space than `NO_DOT_O' on constrained systems
@@ -165,6 +167,7 @@
 
 run runall run_all: $(BINDIR)/exec
 	@(LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR);
\
+        DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH:$(LIBDIR);
\
         PATH=$$PATH:.;
\
         TOPDIR=$(TOPDIR);
\
         TMPDIR=$${TMPDIR:-/tmp}/stdcxx-run-$$$$;
\


Here are the build results I got with that patch. Last four columns have
been omitted to avoid line wraps.

NAME                                     STATUS WARN ASSERTS FAILED
0.alloc                                       0    0       0      0
0.braceexp                                 NOUT    0               
0.char                                        0    8     479      4
0.cmdopts                                FORMAT    0               
0.ctype                                       0   30    3313      0
0.fnmatch                                  NOUT    0               
0.inputiter                                   0    0      20      0
0.new                                         0    0      26      0
0.outputiter                                  0    0       0      0
0.printf                                    BUS    0               
0.process                                     0    0      17      0
0.strncmp                                FORMAT    0               
0.valcmp                                 FORMAT    0               
17.extensions                                 0    0      16      5
17.names                                      0    0       0      0
18.csetjmp                                    0    0       3      0
18.exception                               ABRT    0               
18.limits.cvqual                              0    0    1431      0
18.limits.stdcxx-436                       NOUT    0               
18.limits.traps                               0    0      16      0
18.limits.traps.stdcxx-624                 NOUT    0               
18.numeric.special.float                      0    0     134      3
18.numeric.special.int                        0    0     434     13
18.setjmp                                     0    0       4      1
18.support.dynamic                         ABRT    0               
18.support.rtti                               0    3      24      0
19.cerrno                                     0    0       5      0
19.exceptions.mt                           ABRT    0               
19.std.exceptions                          ABRT    0               
2.smartptr.shared                             0    6     121      0
2.smartptr.weak                               0    3      45      0
20.auto.ptr                                   0    0      58      0
20.function.objects                           0    0     221      0
20.operators                                  0    0       0      0
20.pairs                                      0    0      28      0
20.specialized                                0    0    1756      0
20.specialized.stdcxx-390                  SEGV    0               
20.temp.buffer.mt                             0    0       0      0
20.temp.buffer                             ABRT    0               
21.cctype                                     0    0     281      0
21.cwchar                                     0    5      60      5
21.cwctype                                 COMP    0               
21.string.access                           ABRT    0               
21.string.append                           ABRT    0               
21.string.append.stdcxx-438                NOUT    0               
21.string.assign                           ABRT    0               
21.string.capacity                         ABRT    0               
21.string.compare                          ABRT    0               
21.string.cons.mt                             0    0      16      0
21.string.cons                             ABRT    0               
21.string.copy                             ABRT    0               
21.string.erase                            ABRT    0               
21.string.exceptions                       ABRT    0               
21.string.find.first.not.of                   0    0    6480      0
21.string.find.first.of                       0    0    6740      0
21.string.find.last.not.of                    0    0    6800      0
21.string.find.last.of                        0    0    7060      0
21.string.find                                0    0    7120      0
21.string.insert                           ABRT    0               
21.string.io                               ABRT    0               
21.string.io.stdcxx-206                    ABRT    0               
21.string.io.stdcxx-250                    ABRT    0               
21.string.iterators                           0    0    5725      0
21.string.op.plus.equal                    ABRT    0               
21.string.op.plus                          ABRT    0               
21.string.operators                           0    0   15852      0
21.string.push_back.mt                        0    0       2      0
21.string.replace                          ABRT    0               
21.string.replace.stdcxx-175               ABRT    0               
21.string.rfind                               0    0    6840      0
21.string.stdcxx-162                       NOUT    0               
21.string.stdcxx-231                       NOUT    0               
21.string.stdcxx-466                       NOUT    0               
21.string.substr                           ABRT    0               
21.string.swap                                0    0    4134      0
22.locale.codecvt.length                      0    0     336      0
22.locale.codecvt.mt                          0    0       0      0
22.locale.codecvt.out                         0    0    1494      0
22.locale.codecvt.stdcxx-435               NOUT    0               
22.locale.cons.mt                             0    0       0      0
22.locale.cons.stdcxx-485                     0    0     128      0
22.locale.ctype.is                            0    0   26764      0
22.locale.ctype.mt                            0    0       0      0
22.locale.ctype.narrow                        0    2   10407      0
22.locale.ctype                               0    0   96009      0
22.locale.ctype.scan                          0    0   18024      0
22.locale.ctype.tolower                       0    0   30608      0
22.locale.ctype.toupper                       0    0   20408      0
22.locale.ctype.widen                         0    2     512      0
22.locale.globals.mt                       ABRT    0               
22.locale.messages.mt                         0    0       0      0
22.locale.messages                         ABRT    0               
22.locale.messages.stdcxx-542                 0    0       0      0
22.locale.money.get.mt                        0    0       0      0
22.locale.money.get                           0    0    3880     16
22.locale.money.get.stdcxx-62              NOUT    0               
22.locale.money.put.mt                        0    0      64      0
22.locale.money.put                           0    0    1328      0
22.locale.moneypunct.mt                       0    0       0      0
22.locale.moneypunct                          0    0   13888      8
22.locale.num.get.mt                          0    0       0      0
22.locale.num.get                             0    0   65412     96
22.locale.num.put.mt                          0    0       0      0
22.locale.num.put                             0    2    1667      0
22.locale.num.put.stdcxx-2                 NOUT    0               
22.locale.numpunct.mt                         0    0       0      0
22.locale.numpunct                            0    0    1250     12
22.locale.statics.mt                          0    0       0      0
22.locale.stdcxx-554                       NOUT    0               
22.locale.time.get.mt                         0    0       0      0
22.locale.time.get                            0    4     996     36
22.locale.time.put.mt                         0    0       0      0
22.locale.time.put                            0    0    1792      4
23.associative.stdcxx-16                   NOUT    0               
23.bitset.cons                             ABRT    0               
23.bitset.cons.stdcxx-297                  NOUT    0               
23.bitset                                     0    0 2537538      0
23.deque.iterators                            0    0 4915405      0
23.deque.modifiers                            0    0   89930      0
23.deque.special                              0    0   61465      0
23.deque.special.stdcxx-127                NOUT    0               
23.list.assign                             ABRT    0               
23.list.capacity                           ABRT    0               
23.list.cons                               ABRT    0               
23.list.cons.stdcxx-268                    NOUT    0               
23.list.erase                                 0    0    2152      0
23.list.insert                             ABRT    0               
23.list.insert.stdcxx-331                  NOUT    0               
23.list.iterators                             0    0    2042      0
23.list.special                               0    0    1327      0
23.list.special.stdcxx-334                 NOUT    0               
23.set.stdcxx-216                          NOUT    0               
23.vector.allocator                           0    1       3      0
23.vector.bool.stdcxx-235                  NOUT    0               
23.vector.capacity                         ABRT    0               
23.vector.cons                             ABRT    0               
23.vector.modifiers                        ABRT    0               
23.vector.stdcxx-611                       NOUT    0               
24.istream.iterator.cons.stdcxx-645        NOUT    0               
24.istream.iterator                           0    0      26      0
24.istream.iterator.ops.stdcxx-321         NOUT    0               
24.operations.stdcxx-234                   NOUT    0               
25.adjacent.find                              0    0     384      0
25.binary.search                              0    0     228      0
25.copy                                       0    0    1920      0
25.equal                                      0    0   65536      0
25.equal.range                                0    0     264      0
25.fill                                       0    0     448      0
25.find.end                                   0    0    1692      0
25.find.first                                 0    0    1584      0
25.find                                       0    0     476      0
25.for.each                                   0    0    5504      0
25.generate                                   0    0     456      0
25.heap                                       0    0     316      0
25.includes                                   0    0    1664      0
25.lex.comparison                             0    0    1472      0
25.libc                                       0    0     104      4
25.lower.bound                                0    0     264      0
25.merge                                      0    0   23364      0
25.min.max                                    0    0     528      0
25.mismatch                                   0    0    5376      0
25.nth.element                                0    0    1160      0
25.partial.sort                               0    0   10906      0
25.partitions                                 0    0     624      0
25.permutation                                0    0     336      0
25.random.shuffle                             0    0    4096      0
25.remove                                     0    0    4234      0
25.replace                                    0    0    3650      0
25.reverse                                    0    0     756      0
25.rotate                                     0    0     924      0
25.search                                   BUS    0               
25.set.difference                             0    0   16768      0
25.set.intersection                           0    0   12800      0
25.set.sym.difference                         0    0   16384      0
25.set.union                                  0    0   14336      0
25.sort                                       0    0    5076      0
25.swap                                       0    0     478      0
25.transform                                  0    0   10272      0
25.unique                                     0    0    3762      0
25.upper.bound                                0    0     264      0
26.accumulate                                 0    0    2048      0
26.adjacent.diff                              0    0   12224      0
26.c.math                                     0    0    1143      0
26.class.gslice                               0    0   46230    162
26.indirect.array                             0    0     114      0
26.inner.product                              0    0    2048      0
26.mask.array                                 0    0     177      0
26.partial.sum                                0    0   12224      0
26.valarray.binary.stdcxx-237              NOUT    0               
26.valarray.cassign                           0    1    7702      0
26.valarray.cons                              0    0     396      0
26.valarray.members.stdcxx-313             NOUT    0               
26.valarray.members.stdcxx-318             NOUT    0               
26.valarray.sub.stdcxx-224                 NOUT    0               
26.valarray.sub.stdcxx-309                 NOUT    0               
26.valarray.sub.stdcxx-448                 NOUT    0               
26.valarray.transcend                         0    0      66      3
26.valarray.transcend.stdcxx-315           NOUT    0               
26.valarray.unary.stdcxx-314               NOUT    0               
27.basic.ios.copyfmt.stdcxx-766            NOUT    0               
27.basic.ios.tie.stdcxx-804                NOUT    0               
27.cstdio.stdcxx-195                       NOUT    0               
27.filebuf.codecvt                            0    0  205514      0
27.filebuf.members.stdcxx-308              XFSZ    0               
27.filebuf.virtuals.stdcxx-522             NOUT    0               
27.forward                                    0    0      42      0
27.istream.fmat.arith                      ABRT    0               
27.istream.manip                           ABRT    0               
27.istream.readsome                        ABRT    0               
27.istream.sentry                             0    0     832      0
27.istream.unformatted.get                 ABRT    0               
27.objects                                    0    0      22      0
27.ostream                                 ABRT    0               
27.ostream.unformatted.stdcxx-626          NOUT    0               
27.streambuf.imbue.stdcxx-307              NOUT    0               
27.stringbuf.members.stdcxx-427          FORMAT    0               
27.stringbuf.overflow.stdcxx-795           NOUT    0               
27.stringbuf.str.stdcxx-514                NOUT    0               
27.stringbuf.virtuals                         0    0   86124      0
27.stringbuf.xsputn.stdcxx-515             NOUT    0               
27.stringbuf.xsputn.stdcxx-576             NOUT    0               
8.cstdint                                     0    0     157      0
atomic_add                                    0    0       0      0
atomic_xchg                                   0    0       0      0
PROGRAM SUMMARY:
  Programs:                   224
  Non-zero exit status:         0
  Signalled:                   42
  Compiler warnings:            0
  Linker warnings:              0
  Runtime warnings:            67
  Assertions:             8575585
  Failed assertions:          372
  Cumulative times:
    Real                      1333.300s
    User                      574.270s
    Sys                       737.510s


NAME                                     STATUS WARN ASSERTS FAILED
accumulate                                    0    0               
adj_diff                                      0    0               
advance                                       0    0               
alg1                                          0    0               
alg2                                          0    0               
alg3                                          0    0               
alg4                                          0    0               
alg5                                          0    0               
alg6                                          0    0               
alg7                                          0    0               
auto_ptr                                      0    0               
binary_search                                 0    0               
binders                                       0    0               
bitset                                        0    0               
calc                                          0    0               
codecvt                                       0    0               
codecvt1                                   ABRT    0               
collate                                       0    0               
complex                                       0    0               
complx                                        0    0               
concord                                       0    0               
copyex                                        0    0               
count                                         0    0               
ctype                                         0    0               
deque                                         0    0               
distance                                      0    0               
dynatype                                      0    0               
equal                                         0    0               
equal_range                                   0    0               
failure                                    ABRT    0               
filebuf                                       0    0               
fill                                          0    0               
find                                          0    0               
find_end                                      0    0               
find_first_of                                 0    0               
fmtflags_manip                                0    0               
for_each                                      0    0               
fstream                                       0    0               
funct_ob                                      0    0               
generate                                      0    0               
graph                                         0    0               
gslice                                        0    0               
gslice_array                                  0    0               
has_facet                                     0    0               
heap_ops                                      0    0               
icecream                                      0    0               
ifstream                                      0    0               
includes                                      0    0               
indirect_array                                0    0               
inner_product                                 0    0               
insert_iterator                               0    0               
insert_wchar                                  0    0               
isalnum                                       0    0               
istream1                                      0    0               
istreambuf_iterator                           0    0               
istringstream                                 0    0               
istrstream                                    0    0               
lex_compare                                   0    0               
limits                                        0    0               
list                                          0    0               
locale                                        0    0               
map                                           0    0               
mask_array                                    0    0               
max                                           0    0               
max_elem                                      0    0               
mbsrtowcs                                     0    0               
memfunc                                       0    0               
memfunref                                     0    0               
merge                                         0    0               
messages                                      0    0               
mismatch                                      0    0               
money_get                                     0    0               
money_manip                              OUTPUT    0               
moneypunct                                    0    0               
moneyput                                      0    0               
multimap                                      0    0               
multiset                                      0    0               
mutex                                    OUTPUT    0               
negator                                       0    0               
nthelem                                       0    0               
num_get                                       0    0               
num_put                                       0    0               
numpunct                                   DIFF    0               
ostream                                       0    0               
ostreambuf_iterator                           0    0               
partial_sort                                  0    0               
partial_sum                                   0    0               
partition                                     0    0               
permutation                                   0    0               
pnt2fnct                                      0    0               
priority_queue                                0    0               
queue                                         0    0               
radix                                         0    0               
random_shuffle                                0    0               
remove                                        0    0               
replace                                       0    0               
reverse                                       0    0               
reverse_iterator                              0    0               
rotate                                        0    0               
rwexcept                                   ABRT    0               
search                                        0    0               
set_diff                                      0    0               
set_intr                                      0    0               
set_sym_diff                                  0    0               
set_union                                     0    0               
setex                                         0    0               
sieve                                         0    0               
slice                                         0    0               
slice_array                                   0    0               
sort                                          0    0               
spell                                         0    0               
stack                                         0    0               
stdexcept                                  ABRT    0               
stocks                                   OUTPUT    0               
stream_iterator                               0    0               
string                                        0    0               
stringbuf                                     0    0               
strstream                                     0    0               
strstreambuf                                  0    0               
swap                                          0    0               
tele                                          0    0               
teller                                        0    0               
time_get                                   DIFF    0               
time_manip                               OUTPUT    0               
time_put                                   DIFF    0               
toupper                                    COMP    0               
transform                                     0    0               
ul_bound                                      0    0               
unique                                        0    0               
use_facet                                  COMP    0               
valarray                                      0    0               
vector                                        0    0               
widwork                                       0    0               
wostream                                      0    0               
wstringstream                                 0    0               
PROGRAM SUMMARY:
  Programs:                   135
  Non-zero exit status:         0
  Signalled:                    4
  Compiler warnings:            0
  Linker warnings:              0
  Runtime warnings:             0
  Assertions:                   0
  Failed assertions:            0
  Cumulative times:
    Real                        2.020s
    User                        0.260s
    Sys                         0.620s

Mime
View raw message