Menu

#50 Error building contribs under linux

v1.0_(example)
closed
nobody
None
1
2020-11-30
2020-08-13
No

Hi, when trying to build with build.sh, I have this error:

alain@Gramps-JujuLand2:/opt/TuxPrograms/trunks/harbour/addons/hwgui-src/hwgui/contrib$ ./build.sh
gcc -Wall -O3 -c -I/usr/include/harbour -I/opt/TuxPrograms/trunks/harbour/include -o obj/arr2str.o misc/arr2str.c
gcc -Wall -O3 -c -I/usr/include/harbour -I/opt/TuxPrograms/trunks/harbour/include -o obj/blowfish.o misc/blowfish.c
/opt/TuxPrograms/trunks/harbour/bin/linux/gcc misc/miscfunc.prg -n -w -I/opt/TuxPrograms/trunks/harbour/include -i/usr/include/harbour -d__LINUX__ -d__GTK__  -oobj/miscfunc.c misc/miscfunc.prg
make: execvp: /opt/TuxPrograms/trunks/harbour/bin/linux/gcc : Permission non accordée
makefile.linux:71 : la recette pour la cible « obj/miscfunc.c » a échouée
make: *** [obj/miscfunc.c] Erreur 127

I don't understand why ?

A+

Discussion

  • Wilfried Brunken

    Hello Alain,
    your trouble seems to be an file or directory permission problem or an invalid entry in makefile
    for the Harbour installation path:
    check:
    1.) ls -l /opt/TuxPrograms/trunks/harbour/bin/linux/gcc
    cd /opt/TuxPrograms/trunks/harbour/bin/linux/gcc

     All executable programs (e.g. harbour(.exe)) must have execute permission chmod 755 ..
    
     All directories in the way of the path must also have execute permission chmod 755 ..
     if not, "cd" command fails.
    

    2.) Check path to harbour installation in makefile.linux:

    Modify path to Harbour to your own needs

    HRB_DIR = $(HB_PATH)

    HRB_DIR = $(HOME)/Harbour/core-master

    HRB_EXE = $(HRB_DIR)/bin/linux/gcc/harbour

    I hope, this help you.

    My job in the next few days is to create a Readme file with build instructions.
    It is very hot here in Bremen (35 deg. C)

    With regards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • Aupeix Alain

    Aupeix Alain - 2020-08-14

    Hi Wilfried,

    I had a look to permissions, and it's not the problem, all programs are 775 (who can more, can less)
    I had corrected makefile.linux, as the pathes obviously don't match with my install.
    My install of hwgui didn't melt lib and include files for harbour and hwgui, and due to the structure of makefile, I have copy hwgui libs and include in the same folder than harbour folders.

    HRB_DIR = /opt/TuxPrograms/trunks/harbour
    
    HRB_EXE = $(HRB_DIR)/bin/linux/gcc
    INC_DIR = /usr/include/harbour
    OBJ_DIR = obj
    LIB_DIR = /usr/lib/harbour
    HWGQHTM_DIR  = qhtm
    EXTCONTROL_DIR  = ext_controls
    HWGACTIVEX_DIR  = activex
    HWGMISC_DIR = ./misc
    

    What troubles me is the fact that the two first prg are correctly build, and the third isn't build with this error

    A+

     
  • Aupeix Alain

    Aupeix Alain - 2020-08-14

    Hi, I found the error, HRB_EXE is incorrect and ought to be :
    HRB_EXE = $(HRB_DIR)/bin/linux/gcc/harbour
    as it's not a path, but a file which is pointed

    But now I have another error, which is dur to the fact that my lib path is under /usr, and the rights are wrong ro create the lib in this folder.

    I probably will have to indicate trunks lib folder to avoid this error

    Coulsd it be possible to separate harbout lib and include variables, so i will match with all the install ?

    Thanks
    A+

     
  • Aupeix Alain

    Aupeix Alain - 2020-08-14

    For now, to avoid error, I just add a sudo
    sudo ar rc $@ $^

    A+

     
  • Wilfried Brunken

    Hello Alain,
    this is a write protection problem.
    For installing programs in system directories like /usr or /usr/local
    you need root permission.
    In those cases it is the correct way to switch to root by saying:
    sudo bash
    So you have a "rooted" terminal to build Harbour and HWGUI.
    But i prefer a non root installation.

    I hope, Alexander Kresin can close this ticket.

    With regards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • Aupeix Alain

    Aupeix Alain - 2020-08-18

    this is a write protection problem.

    Yes I know, that why I add sudo
    It was due to the fact that I give the install pathes for lib and include

    But i prefer a non root installation.

    me too

    Thanks

     
  • Maurizio la Cecilia

    • status: open --> closed
     

Log in to post a comment.