40D build broken

Issue #1616 wontfix
Jeff Buchbinder created an issue

The 40D build is failing with:

[ LD       ]   magiclantern
dietlibc.a(vsscanf.o): In function `vsscanf':
vsscanf.c:(.text+0x5c): warning: warning: the scanf functions add several kilobytes of bloat.
dietlibc.a(sprintf.o): In function `sprintf':
sprintf.c:(.text+0x14): warning: warning: Avoid *sprintf; use *snprintf. It is more secure.
stdio.o: In function `FIO_CreateFileOrAppend':
stdio.c:(.text+0x35c): undefined reference to `FIO_SeekFile'
collect2: error: ld returned 1 exit status

I believe something isn't being linked in properly.

Comments (7)

  1. Jeff Buchbinder reporter

    Patch to disable this (as suggested by a1ex):

    diff -r 53fbc6b53da5 src/stdio.c
    --- a/src/stdio.c   Fri Aug 30 15:48:29 2013 +0300
    +++ b/src/stdio.c   Fri Aug 30 09:14:00 2013 -0400
    @@ -148,7 +148,9 @@
         }
         else
         {
    +#ifndef CONFIG_40D
             FIO_SeekFile(f,0,SEEK_END);
    +#endif /* !CONFIG_40D */
         }
         return f;
     }
    
  2. Antony Pavlov

    I have just built 40D in the unified branch:

    $ hg pull
    $ hg update
    $ hg log -l 1
    changeset:   8173:0015424f91e9
    branch:      unified
    tag:         tip
    user:        alex@thinkpad
    date:        Sun Aug 25 19:05:51 2013 +0300
    files:       src/Makefile.src.config src/boot-hack.c src/menu.c
    description:
    QEMU: experimental menu screenshots (CONFIG_QEMU_MENU_SCREENSHOTS in Makefile.user). Still not 100% accurate.
    
    $ make clean
    ...
    $ make 40D
    ...
    [ LD       ]   magiclantern
    dietlibc.a(vsscanf.o): In function `vsscanf':
    vsscanf.c:(.text+0x5c): warning: warning: the scanf functions add several kilobytes of bloat.
    dietlibc.a(sprintf.o): In function `sprintf':
    sprintf.c:(.text+0x14): warning: warning: Avoid *sprintf; use *snprintf. It is more secure.
    [ OBJCOPY  ]   magiclantern.bin
    [ STAT     ]   magiclantern.bin
    magiclantern.bin: 226836 bytes
    [ CC       ]   reboot.o
    [ LD       ]   autoexec
    
    Program Headers:
      Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
      EXIDX          0x03770c 0x00bb760c 0x00bb760c 0x00008 0x00008 R   0x4
      LOAD           0x000100 0x00b80000 0x00b80000 0x37614 0x44ba8 RWE 0x100
    [ OBJCOPY  ]   autoexec.bin
    [ STAT     ]   autoexec.bin
    autoexec.bin: 227344 bytes
    [ SYMBOLS  ]   magiclantern.sym
    [ CP       ]   40D_111.sym
    $
    
  3. Jeff Buchbinder reporter

    I was able to build the rev from Aug 25th as well -- it just isn't building now without disabling that call.

    $ hg log -l 1
    changeset:   8264:53fbc6b53da5
    branch:      unified
    tag:         tip
    user:        alex@thinkpad
    date:        Fri Aug 30 15:48:29 2013 +0300
    summary:     7D: fix issue #1615
    
  4. Jeff Buchbinder reporter

    It's probably a better idea than my hacky solution -- I was just trying to repair the build for testing purposes, but I'd welcome a better patch than mine.

  5. Log in to comment