Twitter (was mache ich gerade?)

    Suche

     

    Credits

    Archiv

    April 2008
    Mo
    Di
    Mi
    Do
    Fr
    Sa
    So
     
     5 
     6 
    11
    12
    15
    16
    18
    19
    20
    21
    22
    23
    26
    27
    28
    29
     
     
     
     
     

    Status

    Online seit 6916 Tagen
    Zuletzt aktualisiert: 17. Apr, 22:03

    Counter & Co.

    Egoload - Verträumter Idealist
    Mein
Koordinaten auf der EgoMap:  93,2
    100% Heidnisch

    Locations of visitors to this page

    Donnerstag, 10. April 2008

    Errata for "Compiling lua-5.1 on Solaris"

    Please note that there's an error in the article Compiling lua-5.1 on Solaris I wrote this morning: In the ./src/Makefile the statement ${MYCFLAGS} has to remain untouched, otherwise lua will lack some functionality (such as io.popen).
    I fixed the error in the article but thought I let you know anyway, for all you feedreaders who might miss this change.

    Compiling lua-5.1 on Solaris

    I just compiled Lua-5.1.3 on Solaris 10/Sparc. It's not that difficult because Lua has been written entirely in ANSI C. The first problem I encountered was the compiler being used, /usr/sfw/bin/gcc. The machine didn't have another one. The compliation process failed while trying to build the lua executable and complained about something wrong in the systems header files:
    
    ranlib liblua.a
    gcc -O2 -Wall -DLUA_USE_POSIX -DLUA_USE_DLOPEN   -c -o lua.o lua.c
    In file included from /usr/include/sys/signal.h:34,
                     from /usr/include/signal.h:26,
                     from lua.c:8:
    /usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:292: error: parse error before '}' token
    /usr/include/sys/siginfo.h:294: error: parse error before '}' token
    /usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
    /usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
    /usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
    /usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
    /usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
    /usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
    /usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
    /usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
    /usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
    /usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
    /usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
    /usr/include/sys/siginfo.h:426: error: parse error before '}' token
    /usr/include/sys/siginfo.h:428: error: parse error before '}' token
    /usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
    /usr/include/sys/siginfo.h:437: error: parse error before '}' token
    In file included from /usr/include/signal.h:26,
                     from lua.c:8:
    /usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
    In file included from lua.c:8:
    /usr/include/signal.h:111: error: parse error before "siginfo_t"
    /usr/include/signal.h:113: error: parse error before "siginfo_t"
    make[2]: *** [lua.o] Error 1
    make[2]: Leaving directory `/opt/gad/sources/lua-5.1.3/src'
    make[1]: *** [solaris] Error 2
    make[1]: Leaving directory `/opt/gad/sources/lua-5.1.3/src'
    make: *** [solaris] Error 2
    
    I changed the Makefile in ./src/Makefile to use Suns own compiler located in /opt/SUNWspro/bin/cc.
    BTW: If you never tried Sun Studio just give it a try, I can really recommend it! (Unless you have some crappy OSS package that relies on gcc.)
     
    After this the compile itself was fine, but I had trouble installing the files. According to the error message Solaris' install can't handle several files at once:
    
    cd src && install -p -m 0755 lua luac /usr/ucb/bin
    usage: install [options] file [dir1 ...]
    make: *** [install] Error 2
    
    Well, there's an easy solution here, too: There are two installs available, one in /usr/sbin, and the other one being the BSD compatible in /usr/ucb. The last one nearly works, all you have to do is to remove the -p flag given in the install:-section of the top level Makefile.
     
    Here are the changes I made to both Makefiles contained in the package. I used diff -c to create them. The first block is the original package, the second block lists my changes, given in the context they appear:
    
    # diff -c lua-5.1.3/Makefile lua-5.1.3-solaris/Makefile
    *** lua-5.1.3/Makefile  Thu Jan 17 18:53:37 2008
    --- lua-5.1.3-solaris/Makefile  Thu Apr 10 09:14:31 2008
    ***************
    *** 23,33 ****
      # How to install. If you don't have "install" (unlikely) then get install-sh at
      #     http : / / dev.w3.org/cvsweb/libwww/config/install-sh
      # or use cp instead.
    ! INSTALL_EXEC= $(INSTALL) -p -m 0755
    ! INSTALL_DATA= $(INSTALL) -p -m 0644
    
      # Utilities.
    ! INSTALL= install
      MKDIR= mkdir
    
      # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
    --- 23,33 ----
      # How to install. If you don't have "install" (unlikely) then get install-sh at
      #     http : / / dev.w3.org/cvsweb/libwww/config/install-sh
      # or use cp instead.
    ! INSTALL_EXEC= $(INSTALL) -m 0755
    ! INSTALL_DATA= $(INSTALL) -m 0644
    
      # Utilities.
    ! INSTALL= /usr/ucb/install
      MKDIR= mkdir
    
      # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
    
    And this is for ./src/Makefile:
    
    # diff -c lua-5.1.3/src/Makefile lua-5.1.3-solaris/src/Makefile
    *** lua-5.1.3/src/Makefile      Sat Jan 19 20:37:58 2008
    --- lua-5.1.3-solaris/src/Makefile      Thu Apr 10 09:08:11 2008
    ***************
    *** 7,14 ****
      # Your platform. See PLATS for possible values.
      PLAT= none
    
    ! CC= gcc
    ! CFLAGS= -O2 -Wall $(MYCFLAGS)
      AR= ar rcu
      RANLIB= ranlib
      RM= rm -f
    --- 7,14 ----
      # Your platform. See PLATS for possible values.
      PLAT= none
    
    ! CC= /opt/SUNWspro/bin/cc
    ! CFLAGS= -xtarget=ultra3 -xarch=v8 -xO3 $(MYCFLAGS)
      AR= ar rcu
      RANLIB= ranlib
      RM= rm -f
    
    Please note that you might be interested in changing CFLAGS to something specific for your environment, especially if you're compiling for amd64/x86 (-xtarget=opteron). The settings I used should work on most modern Sun HW, e.g. everything with a UltraSparcIII CPU or newer. -xarch=v8 creates a 32 Bit binary without much optimization in regard of the CPUs chipset.
     
    Edit: And here's the standard diff, for those of you how don't like the format used above:
    
    # diff lua-5.1.3/Makefile lua-5.1.3-solaris/Makefile
    26,27c26,27
    < INSTALL_EXEC= $(INSTALL) -p -m 0755
    < INSTALL_DATA= $(INSTALL) -p -m 0644
    ---
    > INSTALL_EXEC= $(INSTALL) -m 0755
    &gt; INSTALL_DATA= $(INSTALL) -m 0644
    30c30
    < INSTALL= install
    ---
    > INSTALL= /usr/ucb/install
    # diff lua-5.1.3/src/Makefile lua-5.1.3-solaris/src/Makefile
    10,11c10,11
    &lt; CC= gcc
    < CFLAGS= -O2 -Wall $(MYCFLAGS)
    ---
    > CC= cc
    &gt; CFLAGS= -xtarget=ultra3 -xarch=v8 -xO3 $(MYCFLAGS)
    
    Please note that again, lua-5.1.3-solaris is the directory containing the source tree with my changes.
     
    Errata: I accidentaly removed the $MYCFLAGS statement from CFLAGS in the original ./src/Makefile. This disables several features which are required for Lua to work. Make sure you leave ${MYCFLAGS} intact!

    Aktuelle Beiträge

    Im happy I finally registered
    Excellent write-up. I absolutely love this site. Continue...
    http://mittenmail3.isblog.net/pick-a-winner-via-hashtag-entry-for-twitter-and-instagram-woobox-bl... (Gast) - 17. Apr, 22:03
    Just want to say Hi!
    I all the time emailed this blog post page to all...
    how to get instagram likes (Gast) - 30. Mär, 23:20
    Im happy I now signed...
    Hello, There's no doubt that your website could possibly...
    buy instagram followers cheap (Gast) - 30. Mär, 09:27
    Hallo Miau!
    Ich will einen schönen Tag wünschen, mit unseren Schmusekatzen....
    SCHLAGLOCH - 4. Apr, 14:51
    Sehe hier nut Tag und...
    Wo ist das Jahr an dem der Text geschrieben wurde?
    Gast (Gast) - 3. Mär, 20:38

    User Status

    Du bist nicht angemeldet.

    ...wenn man trotzdem lacht
    Atari Mega ST
    Auf Arbeit
    Bloggen
    Bookmarks & Links
    BSD
    Bundeswehr
    CCC07
    Computing
    Contentmafia
    Datenschutz
    DRM
    Fahrrad
    Finanzkrise
    Fundsachen
    G8
    ... weitere
    Profil
    Abmelden
    Weblog abonnieren