Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#46291 closed defect (fixed)

msp430-gdb @7.2a-20111205_0 Fails to build on Yosemite and later

Reported by: adreg@… Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: haspatch Cc: guillaumesalagnac, fedorov@…
Port: msp430-gdb, msp430-gdb-devel

Description (last modified by ryandesign (Ryan Carsten 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@… 9 years ago.
0002-bfdio-Invalid-size-of-memset.patch (686 bytes) - added by adreg@… 9 years ago.
0003-elflink-Possible-use-of-unintialized-variable.patch (770 bytes) - added by adreg@… 9 years ago.
0004-interp-Missing-return-value.patch (939 bytes) - added by adreg@… 9 years ago.
0005-tui-Unkown-function.patch (416 bytes) - added by fedorov@… 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by adreg@…

Changed 9 years ago by adreg@…

Changed 9 years ago by adreg@…

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

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

comment:2 Changed 9 years ago by guillaumesalagnac

Cc: guillaume.salagnac@… added

Cc Me!

Changed 9 years ago by fedorov@…

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

Resolution: fixed
Status: newclosed

In 7026bf4a25daae16beab5e17b55088af948a4ab9/macports-ports (master):

msp430-gdb, msp430-gdb-devel: Fix build with clang

Closes: #46291

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: fedorov@… added
Keywords: haspatch added
Port: msp430-gdb msp430-gdb-devel added; mps430-gdb removed
Summary: msp430-gdb @7..2a-20111205_0 Fails to build on Yosemitemsp430-gdb @7.2a-20111205_0 Fails to build on Yosemite and later

Thanks adreg and fedorov for the patches and sorry for taking so long to commit them.

I was able to reproduce the errors fixed by patches 0002, 0003, and 0004, and the proposed fixes look correct.

The problem fixed by patch 0005 is now only a warning, not an error, but the proposed fix is correct. Readline renamed those poorly-chosen type names awhile back. The old type names are still present, but deprecated. I regenerated this patch to be a unified diff rather than a contextual one and so that it named the file being patched, and renamed the file to fix the typo and to indicate that it was type names that were undefined, not functions.

I was not able to reproduce the problem fixed by patch 0001 so I did not commit it. With the remaining patches, the port built fine for me on macOS High Sierra, regardless of whether or not I had the texinfo port installed.

Aljaž, do you still want to maintain these ports? These patches were sitting in this ticket for over 4 years awaiting your response.

comment:5 in reply to:  4 Changed 5 years ago by g5pw (Aljaž Srebrnič)

Replying to ryandesign:

Aljaž, do you still want to maintain these ports? These patches were sitting in this ticket for over 4 years awaiting your response.

I'm sorry, this port is definitely abandoned, also by upstream... We should probably delete this in favor of msp430-elf-gcc.

Note: See TracTickets for help on using tickets.