[M3devel] Bootstrapping cm3 on OS X 10.9.5

Jay K jay.krell at cornell.edu
Wed May 20 21:11:22 CEST 2015


Hi Olaf,
This is surely some printf/sprint wrapper from stdio.h.Did you copy files across from some other machine or this is all one-machine?Try the C backend? I
-lSystem?

#include <stdio.h>int main(){char buffer[10];printf("");sprint(buffer, "");return 0;}
  gcc -E 1.c    gcc -S 1.c    gcc 1.c    gcc -v 1.c  libtool a.out ?
Hopefully I'll find more time here..
 - Jay



> Date: Tue, 19 May 2015 23:56:09 +0200
> From: wagner at elegosoft.com
> To: rodney.m.bates at acm.org; m3devel at elegosoft.com
> Subject: Re: [M3devel] Bootstrapping cm3 on OS X 10.9.5
> 
> On Tue, 19 May 2015 01:33:49 +0200
> Olaf Wagner <wagner at elegosoft.com> wrote:
> 
> > After replacing the configuration files with those from the current code
> > base and adapting some basic system tool definitions like gcc and libtool
> > I have now successfully compiled m3core. This looks good so far.
> 
> I almost succeeded in building a new cm3 from sources now, but I'm
> stuck at something again I don't understand. Symbol ___eprintf is
> referenced from m3core, but there is no static definition for it in
> any library I can find.
> 
>  -> linking cm3
> generate _m3main.new
> compare _m3main.new _m3main.c
> rm _m3main.new
> /usr/bin/gcc -o cm3  _m3main.o cm3unix.o Version.io M3Backend.io M3Backend.mo UtilsPosix.mo Arg.io Arg.mo Builder.io Builder.mo Dirs.io Dirs.mo M3Build.io M3Build.mo M3Loc.io M3Loc.mo M3Options.io M3Options.mo M3Unit.io M3Unit.mo Makefile.io Makefile.mo Msg.io Msg.mo Utils.io Utils.mo WebFile.io WebFile.mo Main.mo /usr/local/cm3/pkg/m3back/AMD64_DARWIN/libm3back.a /usr/local/cm3/pkg/m3objfile/AMD64_DARWIN/libm3objfile.a /usr/local/cm3/pkg/m3quake/AMD64_DARWIN/libm3quake.a /usr/local/cm3/pkg/m3front/AMD64_DARWIN/libm3front.a /usr/local/cm3/pkg/m3linker/AMD64_DARWIN/libm3link.a /usr/local/cm3/pkg/m3middle/AMD64_DARWIN/libm3middle.a /usr/local/cm3/pkg/sysutils/AMD64_DARWIN/libsysutils.a /usr/local/cm3/pkg/libm3/AMD64_DARWIN/libm3.a /usr/local/cm3/pkg/m3core/AMD64_DARWIN/libm3core.a -multiply_defined suppress -bind_at_load -shared-libgcc -dead_strip -headerpad_max_install_names
> Undefined symbols for architecture x86_64:
>   "___eprintf", referenced from:
>       _ThreadPThread__ProcessStopped in libm3core.a(ThreadApple.o)
>       _InstallOneHandler in libm3core.a(RTSignalC.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> ----
> 
> elegos-MacBook-Pro:cm3 wagner$ for f in $(find /usr/lib /usr/local/lib /opt/local/lib /usr/local/cm3/lib -name *.a); do nm $f 2>/dev/null | grep ___eprintf && echo "found in $f"; done
>                  U ___eprintf
>                  U ___eprintf
> found in /usr/local/cm3/lib/libm3core.a
> 
> ----
> 
> elegos-MacBook-Pro:cm3 wagner$ for f in $(find /usr/lib /usr/local/lib /opt/local/lib /usr/local/cm3/lib -name *.dylib); do nm $f 2>/dev/null | grep ___eprintf && echo "found in $f"; done
>          U ___eprintf
> 000141c0 t ___eprintf
> found in /usr/lib/lib6200Lib.dylib
>          U ___eprintf
> 00019bf0 t ___eprintf
> found in /usr/lib/lib7225lib.dylib
> 00016c60 t ___eprintf
>          U ___eprintf
> found in /usr/lib/lib8200Alib.dylib
> 00017d30 t ___eprintf
>          U ___eprintf
> found in /usr/lib/lib8220lib.dylib
>          U ___eprintf
> 00009a10 t ___eprintf
> found in /usr/lib/libAgent.dylib
>          U ___eprintf
> 00018f00 t ___eprintf
> found in /usr/lib/libIceraDownloadLib.dylib
>          U ___eprintf
> 000081bb t ___eprintf
> found in /usr/lib/libTinyXml.dylib
> 0000000000001850 t ___eprintf
> found in /usr/local/cm3/lib/libm3core.5.2.dylib
> 0000000000001850 t ___eprintf
> found in /usr/local/cm3/lib/libm3core.5.dylib
> 0000000000001850 t ___eprintf
> found in /usr/local/cm3/lib/libm3core.dylib
> 
> ----
> 
> Does anybody know what it the standard solution for this?
> The symbol is even defined in the dynamic version of m3core itself.
> Is static linking not supported anymore? Or should I just link
> against one of the above dynamically?
> The m3makefile for cm3 still contains
> 
>   build_standalone () %-- we don't want to depend on the shared libraries...
> 
> 
> Any hint will be appreciated.
> 
> Olaf
> -- 
> Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com 
>                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
> Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150520/d8bb33c3/attachment-0002.html>


More information about the M3devel mailing list