Menu

#251 Unable to finish build on FreeBSD

v.5.0
closed
nobody
None
5
2025-01-18
2025-01-09
epsheldoni
No

I am running FreeBSD 14.2-RELEASE. I had to change build_app.sh #! to
/usr/local/bin/bash
Everything proceeds and I get the prompt:

The Makefile configured for your system was written.
Now just type "make" to compile Scid.
Type "make install" to build the Scid.app.

I am unable to complete the final make. I get the following:

mv: Scid.app/Contents/Resources/Info.plist: No such file or directory
configure: Makefile configuration program for Scid
Renaming "Makefile" to "Makefile.bak"
Tcl/Tk version: 8.6
Your operating system is: FreeBSD 14.2-RELEASE
Location of "tcl.h": /usr/local/include/tcl8.6
Location of Tcl 8.6 library: /home/sheldoni/Chess/scid-5.1.0/tcltk/lib
Using Makefile.conf.
The Makefile configured for your system was written.
Now just type "make" to compile Scid.
Type "make install" to build the Scid.app.
sheldoni@pangolin:~/Chess/scid-5.1.0 $ make
g++ -lz -ldl -O2 -pipe -std=c++20 -O3 -fno-rtti -fno-exceptions -pthread -Wall -Wno-deprecated-declarations -DNDEBUG -L/home/sheldoni/Chess/scid-5.1.0/tcltk/lib -ltcl8.6 -o scid
/usr/local/bin/ld: /usr/lib/crt1.o: in function _start': /usr/src/lib/csu/amd64/crt1_s.S:69:(.text+0x23): undefined reference tomain'
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.
make: stopped in /home/sheldoni/Chess/scid-5.1.0

Here is the file /usr/src/lib/csu/amd64/crtl_s.S

include <machine asm.h=""></machine>

.text
.align 8

/*
 * The program entry point
 *        %rdi      %rsi
 * void _start(char **ap, void (*cleanup)(void)) __dead2
 */
.globl  _start
.type   _start, @function

_start:
.cfi_startproc
.cfi_undefined %rip / Terminate call chain. /
pushq %rbp / Align stack, terminate call chain. /
.cfi_def_cfa_offset 8
movq %rsp, %rbp
.cfi_offset %rbp, -16
.cfi_def_cfa_register %rbp

ifdef GCRT

subq    $16, %rsp

endif

movq    %rsi, %rcx
movq    %rdi, %rsi      /* argv = ap */
addq    $8, %rsi        /* argv += 1 */
movq    %rdi, %rdx      /* env = ap */
addq    $16, %rdx       /* env += 2 */
movslq  (%rdi), %rax
movl    %eax, %edi      /* argc = *(long *)(void *)ap */
shlq    $3, %rax
addq    %rax, %rdx      /* env += argc */

ifdef PIC

/*
 * XXX. %rip relative addressing is not intended for use in the
 * large memory model due to the offset from %rip being limited
 * to 32 bits.
 */
leaq    main@plt(%rip), %r8

else

movabsq $main, %r8  ## LINE 69

endif

ifdef GCRT

movabsq $eprol, %r9
movabsq $etext, %rax
movq    %rax, (%rsp)
/*
 *            %edi  %rsi  %rdx  %rcx    %r8    %r9    (%rsp)
 * __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext)
 */
callq   __libc_start1_gcrt

eprol:

else

/* __libc_start1(argc, argv, env, cleanup, main) */
callq   __libc_start1

endif

int3
.cfi_endproc
.size   _start, . - _start

.section .note.GNU-stack,"",%progbits

I am not sure how to proceed.

Discussion

  • epsheldoni

    epsheldoni - 2025-01-15

    I was able to finally build scid on FreeBSD 14.2.
    First, I had to create a symbolic link from
    tclsh86 to tclsh in
    /usr/local/bin.
    Using gmake, I had an error stating that /src/bytebuf.h
    was missing #include <cstdint>.
    After adding that to bytebuf.h and running gmake
    compilation completed. scid runs just fine.</cstdint>

    These issues must be due to pecularities of FreeBSD.
    
     
  • epsheldoni

    epsheldoni - 2025-01-16

    How do I close this ticket?

     
  • Fulvio

    Fulvio - 2025-01-18
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB