On Fri Apr 07, 2023 at 11:18:13PM +0200, Sven M. Hallberg wrote:
> Hi,
> 
> after some initial trouble, I managed to update this port to the latest
> version. The issue I ran into was that the build failed with a linker
> error that, strangely, did not appear when I compiled the package by
> hand outside of ports.
> 
> Specifically, building ucsim failed with
> 
>         ld: error: undefined symbol:  uc_yy_free_string_to_parse()
>         ld: error: undefined symbol: yylex()
> 
> config.log showed this:
> 
>         checking for lex output file root... (cached) lex.yy
>         checking for lex library... cat: lex.yy.c: No such file or directory
>         cat: lex.yy.c: No such file or directory
>         cat: lex.yy.c: No such file or directory
>         not found
>         configure: WARNING: required lex library not found; giving up on flex
> 
> What happens is that the OpenBSD config.site sets the variable
> ac_cv_prog_lex_root (shown cached above) and this causes the following
> check for the lex library to fail, since the test assumes the file
> lex.yy.cc to exit as a side effect of the first test. The configure
> script then sets LEX=':' (the empty command). Then the empty command
> gets used with an output redirection, creating an empty C file, which
> the compiler happily accepts, until the linker notices that it didn't
> define any of the symbols that it should have.
> 
> I solved the issue by adding ac_cv_lib_lex='none needed' to
> CONFIGURE_ENV. Or should that be -lfl? Should this variable be added to
> config.site itself?
> 
> Further changes:
> 
> - Removed the only two patches (patch-sim_ucsim_cmd_src_Makefile_in and
>   patch-sim_ucsim_cmd_src_cmdlex_l) that change the name cmdpars.hh
>   to cmdpars.h. Their comment says "Allow use of in-base yacc."
>   The build worked for me without them, using yacc from base, so I guess
>   they are no longer needed?
> 
>   portcheck complained that I didn't remove the empty patches directory,
>   so i did that, but now the removal of the files no longer appears in
>   the diff. Not sure if I did this right. ;)
> 
> - Changes to CONFIGURE_ENV:
>   - Changed sdcc_cv_CCggdb=no to sdcc_cv_c_ggdb=no. I think this may
>     have been a typo?!
>   - Guessing that the intention was to not compile anything with -ggdb,
>     I also added sdcc_cv_cxx_ggdb=no and bor_cv_c_ggdb=no. The latter
>     appears in debugger/mcs51/configure.
>   - Removed sdcc_cv_c_fms_extensions=no. I could not find that variable
>     in the source.
> 
> - Added curses to WANTLIB (needed by serialview).
> 
> I tested this on my amd64 system. I couldn't check if the archs marked
> BROKEN (sparc64, alpha, aarch64) are still current.
> 
> Regards,
> pesco
> 
> PS: Not subscribed to ports@, please Cc me in replies.
> 

Thanks Sven, your changes make sense to me.  Sorry Brian I was probably
something in Easter mode and too fast. This was committed.

Reply via email to