Opened 3 years ago

Last modified 3 years ago

#46291 new defect

msp430-gdb @7..2a-20111205_0 Fails to build on Yosemite

Reported by: adreg@… Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: guillaume.salagnac@…
Port: mps430-gdb

Description (last modified by ryandesign (Ryan Schmidt))

Various build errors on Yosemite. Attaching patches for all but one.

0001-Add-TEXINFO-to-build-arguments.patch: Missing texinfo path (same as this? #42796)

info:build bfd.texinfo:326: unknown command `colophon'
:info:build bfd.texinfo:337: unknown command `cygnus'
:info:build make[3]: *** [bfd.info] Error 1

0002-bfdio-Invalid-size-of-memset.patch:

:info:build bfdio.c:580:31: error: 'memset' call operates on objects of type 'struct stat' while the size is based on a different type
struct stat *' [-Werror,-Wsizeof-pointer-memaccess]
:info:build   memset (statbuf, 0, sizeof (statbuf));
:info:build           ~~~~~~~             ^~~~~~~
:info:build bfdio.c:580:31: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
:info:build   memset (statbuf, 0, sizeof (statbuf));
:info:build                               ^~~~~~~
:info:build 1 error generated.
:info:build make[4]: *** [bfdio.lo] Error 1

0003-elflink-Possible-use-of-unintialized-variable.patch:

:info:build elflink.c:12418:9: error: variable 'l_sec_contents' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometi
es-uninitialized]
:info:build                   if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
:info:build                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build elflink.c:12434:9: note: uninitialized use occurs here
:info:build                   if (l_sec_contents)
:info:build                       ^~~~~~~~~~~~~~
:info:build elflink.c:12418:5: note: remove the 'if' if its condition is always false
:info:build                   if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
:info:build                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build elflink.c:12416:44: note: initialize the variable 'l_sec_contents' to silence this warning
:info:build                   bfd_byte *sec_contents, *l_sec_contents;
:info:build                                                          ^
:info:build                                                           = NULL
:info:build 1 error generated.
:info:build make[4]: *** [elflink.lo] Error 1

0004-interp-Missing-return-value.patch:

:info:build interp.c:1686:27: warning: passing 'char *' to parameter of type 'const unsigned char *' converts between pointers to integ
r types with different sign [-Wpointer-sign]
:info:build       sim_write (sd, lma, buffer, size);
:info:build                           ^~~~~~
:info:build interp.c:1827:38: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
:info:build           fprintf (stderr, "Cycles:      %d\n", alu.cycles);
:info:build                                          ~~     ^~~~~~~~~~
:info:build                                          %lu
:info:build interp.c:1828:43: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
:info:build           fprintf (stderr, "Instructions: %d\n", alu.insns);
:info:build                                           ~~     ^~~~~~~~~
:info:build                                           %lu
:info:build interp.c:1829:42: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
:info:build           fprintf (stderr, "Interrupts:  %d\n", alu.interrupts);
:info:build                                          ~~     ^~~~~~~~~~~~~~
:info:build                                          %lu
:info:build interp.c:1883:5: error: non-void function 'get_stop_addr' should return a value [-Wreturn-type]
:info:build     return;
:info:build     ^
:info:build interp.c:1887:7: error: non-void function 'get_stop_addr' should return a value [-Wreturn-type]
:info:build       return;
:info:build       ^
:info:build interp.c:1894:5: error: non-void function 'get_stop_addr' should return a value [-Wreturn-type]
:info:build     return;
:info:build     ^
:info:build 5 warnings and 3 errors generated.
:info:build make[3]: *** [interp.o] Error 1

One error still exists which I have not managed to fix in a good way:

:info:build ./tui/tui-io.c:132:8: error: unknown type name 'Function'
:info:build static Function *tui_old_rl_getc_function;
:info:build        ^
:info:build ./tui/tui-io.c:133:8: error: unknown type name 'VFunction'
:info:build static VFunction *tui_old_rl_redisplay_function;
:info:build        ^
:info:build ./tui/tui-io.c:134:8: error: unknown type name 'VFunction'
:info:build static VFunction *tui_old_rl_prep_terminal;
:info:build        ^
:info:build ./tui/tui-io.c:135:8: error: unknown type name 'VFunction'
:info:build static VFunction *tui_old_rl_deprep_terminal;
:info:build        ^
:info:build 4 errors generated.
:info:build make[2]: *** [tui-io.o] Error 1

Right now I just added the missing typedefs after the readline include in tui-io.c..

Attachments (5)

0001-Add-TEXINFO-to-build-arguments.patch (679 bytes) - added by adreg@… 3 years ago.
0002-bfdio-Invalid-size-of-memset.patch (686 bytes) - added by adreg@… 3 years ago.
0003-elflink-Possible-use-of-unintialized-variable.patch (770 bytes) - added by adreg@… 3 years ago.
0004-interp-Missing-return-value.patch (939 bytes) - added by adreg@… 3 years ago.
0005-tui-Unkown-function.patch (416 bytes) - added by fedorov@… 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by adreg@…

Changed 3 years ago by adreg@…

Changed 3 years ago by adreg@…

comment:1 Changed 3 years ago by ryandesign (Ryan Schmidt)

  • Cc g5pw@… removed
  • Description modified (diff)
  • Owner changed from macports-tickets@… to g5pw@…

comment:2 Changed 3 years ago by guillaume.salagnac@…

  • Cc guillaume.salagnac@… added

Cc Me!

Changed 3 years ago by fedorov@…

Note: See TracTickets for help on using tickets.