Página 1 de 1

cannot find -lgpm

Enviado: 18 Jul 2021 12:03
por sergiosouzalima
Olá, amigos!

Podem me ajudar?

Continuo tentando usar um ambiente gráfico que seja compatível para Linux e Windows.

Enquanto tento converter um sistema antigo de Clipper para Harbour, estou criando um exemplo usando HwGui, para teste.

No momento a compilação apresenta a saída a seguir com o erro "/usr/bin/ld: cannot find -lgpm"

Código: Selecionar todos

$ hbmk2 compila.hbp 
hbmk2[compila]: Warning: Cannot find hwgui.hbc (referenced from compila.hbp)
Harbour 3.2.0dev (r1712151853)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'main.prg'...
Lines 3657, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_gXGeh9.dir/main.c'... Done.
/usr/bin/ld: cannot find -lgpm
collect2: error: ld returned 1 exit status
hbmk2[compila]: Error: Running linker. 1
gcc '/tmp/hbmk_gXGeh9.dir/main.o' '/tmp/hbmk_gXGeh9.dir/hbmk_o6Ljkd.o'   -Wl,--start-group -lhwgui -lm -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -ldl -lrt -lhbpcre -lhbzlib -lgpm   -Wl,--end-group -static -o'hwgui_test' -L/usr/lib/harbour -L'/home/sergio/workspace/hwgui-code/hwgui/lib'
Seguem mais detalhes:

Arquivo compila.hbp

Código: Selecionar todos

#
# $Id: compila.hbp $
#

-w0
-gc3
-ohwgui_test
-lhwgui

hwgui.hbc

# Special parameters for LINUX/GTK
{linux}-lm
{linux}-static
{linux}-d__LINUX__
{linux}-d__GTK__

-L/home/sergio/workspace/hwgui-code/hwgui/lib/
-i/home/sergio/workspace/hwgui-code/hwgui/include

main.prg
Arquivo main.prg

Código: Selecionar todos

#include "hwgui.ch"

Function Main()
    Local oMainWnd, oFont
    Local aCombo := {"First","Second" }

   PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13

   INIT WINDOW oMainWnd TITLE "Example" ;
      FONT oFont ;
      ON EXIT {||hwg_MsgYesNo("Really want to quit ?")}

   @ 20,10 EDITBOX "Hello, World!" SIZE 200,30

   @ 270,10 COMBOBOX aCombo SIZE 100, 150 TOOLTIP "Combobox"

   @ 120,60 BUTTON "Close" SIZE 150,30 ;
      ON CLICK {||oMainWnd:Close()}

   MENU OF oMainWnd
      MENUITEM "About" ACTION hwg_MsgInfo("First HwGUI Application")
   ENDMENU

   ACTIVATE WINDOW oMainWnd

   hwg_writelog( "Program terminated " + Dtoc(Date()) + " at " + Time() )

RETURN NIL
Se o problema é o arquivo ou lib "gpm" existe um "gpm" aqui:

Código: Selecionar todos

$ which gpm
/usr/sbin/gpm
Estou no Linux Mint:

Código: Selecionar todos

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20
Release:	20
Codename:	ulyana
Versões gcc e Harbour:

Código: Selecionar todos

$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ hbmk2 --version
Harbour Make (hbmk2) 3.2.0dev (r2017-12-15 18:53)
Copyright (c) 1999-present, Viktor Szakats
https://github.com/harbour/core/
Obrigado!!

cannot find -lgpm

Enviado: 18 Jul 2021 13:57
por JoséQuintas
A primeira mensagem de alerta diz tudo.

Código: Selecionar todos

$ hbmk2 compila.hbp
hbmk2[compila]: Warning: Cannot find hwgui.hbc (referenced from compila.hbp)

cannot find -lgpm

Enviado: 18 Jul 2021 14:13
por Itamar M. Lins Jr.
Olá!

Código: Selecionar todos

sudo apt install libgpm-dev
Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 14:17
por Itamar M. Lins Jr.
Olá!

Código: Selecionar todos

hbmk2[compila]: Warning: Cannot find hwgui.hbc (referenced from compila.hbp)
Basta colocar o endereço do hwgui.hbc
../minha/pasta/onde/ta/hwgui.hbc

Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 14:34
por sergiosouzalima
Obrigado pelas respostas, pessoal.

Ainda não está gerando o executável, mas a mensagem de compilação mudou um pouco.

* Instalei a lib gpm

Código: Selecionar todos

$ sudo apt install libgpm-dev
[sudo] password for sergio:     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libgpm-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14,3 kB of archives.
After this operation, 84,0 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libgpm-dev amd64 1.20.7-5 [14,3 kB]
Fetched 14,3 kB in 1s (21,2 kB/s)     
Selecting previously unselected package libgpm-dev:amd64.
(Reading database ... 372741 files and directories currently installed.)
Preparing to unpack .../libgpm-dev_1.20.7-5_amd64.deb ...
Unpacking libgpm-dev:amd64 (1.20.7-5) ...
Setting up libgpm-dev:amd64 (1.20.7-5) ...
* Acrescentei a linha "L/home/sergio/workspace/hwgui-code/hwgui" no meu hbp:

Código: Selecionar todos

#
# $Id: compila.hbp $
#

-w0
-gc3
-ohwgui_test
-lhwgui

hwgui.hbc

# Special parameters for LINUX/GTK
{linux}-lm
{linux}-static
{linux}-d__LINUX__
{linux}-d__GTK__

-L/home/sergio/workspace/hwgui-code/hwgui
-L/home/sergio/workspace/hwgui-code/hwgui/lib
-i/home/sergio/workspace/hwgui-code/hwgui/include

main.prg
* O hwgui.hbc está no local correto

Código: Selecionar todos

$ ll /home/sergio/workspace/hwgui-code/hwgui/hwgui.hbc
-rw-rw-r-- 1 sergio sergio 948 Jul 17 17:44 /home/sergio/workspace/hwgui-code/hwgui/hwgui.hbc
* Continua não achando a hwgui.hbc

Código: Selecionar todos

$ hbmk2 compila.hbp
hbmk2[compila]: Warning: Cannot find hwgui.hbc (referenced from compila.hbp)
Harbour 3.2.0dev (r1712151853)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'main.prg'...
Lines 3657, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_Pd0eIp.dir/main.c'... Done.
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(hvmall.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(cmdarg.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(extrap.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(initsymb.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(proc.o): relocation R_X86_64_32S against symbol `hb_symEval' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(harbinit.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(cdpapi.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(chrasc.o): relocation R_X86_64_32S against symbol `hb_szAscii' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(console.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(datec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(dates.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(dateshb.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errint.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errintlo.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(filebuf.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(filesys.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(fserr.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(fstemp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(gtapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(gtclip.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbgtcore.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbi18n1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbrandom.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbtoken.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(idle.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(inkeyapi.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(itemseri.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(langapi.o): relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(math.o): relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(padx.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(philes.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(setcolor.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(setkey.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(spfiles.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(transfrm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(trim.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(xhelp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errsys.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(tclass.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(tobject.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(direct.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(file.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbcrc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbstrfmt.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(alert.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(objfunc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(valtoexp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(arc4.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libgtcgi.a(gtcgi.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(dbcmd.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(workarea.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(wacore.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(wafunc.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(rddsys.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(dbf1.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/librddntx.a(dbfntx1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/librddfpt.a(dbffpt1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macroy.o): relocation R_X86_64_32S against symbol `hb_macro_ExprTable' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macroa.o): relocation R_X86_64_32S against symbol `hb_macro_ExprTable' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macrob.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macrolex.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(expropt1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(expropt2.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(funcid.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbdate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbffind.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbfsapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbprintf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbstr.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbver.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbverdsp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(eval.o): relocation R_X86_64_32 against symbol `hb_symEval' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbregexc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
hbmk2[compila]: Error: Running linker. 1
gcc '/tmp/hbmk_Pd0eIp.dir/main.o' '/tmp/hbmk_Pd0eIp.dir/hbmk_xD2CPq.o'   -Wl,--start-group -lhwgui -lm -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -ldl -lrt -lhbpcre -lhbzlib -lgpm   -Wl,--end-group -o'hwgui_test' -L/usr/lib/harbour -L'/home/sergio/workspace/hwgui-code/hwgui' -L'/home/sergio/workspace/hwgui-code/hwgui/lib'
Obrigado!!

cannot find -lgpm

Enviado: 18 Jul 2021 15:10
por sergiosouzalima
Agora melhorou um pouco.

No compila.hbp, indiquei o caminho (pastas) para chegar ao hwgui.hbc, antes de indicar o próprio hwgui.hbc

Código: Selecionar todos

#
# $Id: compila.hbp $
#

-w0
-gc3
-ohwgui_test
-lhwgui

-L/home/sergio/workspace/hwgui-code/hwgui
-L/home/sergio/workspace/hwgui-code/hwgui/lib
-i/home/sergio/workspace/hwgui-code/hwgui/include

hwgui.hbc

# Special parameters for LINUX/GTK
{linux}-lm
{linux}-static
{linux}-d__LINUX__
{linux}-d__GTK__


main.prg
* Mas continua dando os erros abaixo ao compilar

Código: Selecionar todos

$ hbmk2 compila.hbp
Harbour 3.2.0dev (r1712151853)
Copyright (c) 1999-2016, http://harbour-project.org/
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(hvmall.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(cmdarg.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(extrap.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(initsymb.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(proc.o): relocation R_X86_64_32S against symbol `hb_symEval' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(harbinit.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(cdpapi.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(chrasc.o): relocation R_X86_64_32S against symbol `hb_szAscii' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(console.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(datec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(dates.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(dateshb.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errint.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errintlo.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(filebuf.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(filesys.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(fserr.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(fstemp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(gtapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(gtclip.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbgtcore.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbi18n1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbrandom.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbtoken.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(idle.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(inkeyapi.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(itemseri.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(langapi.o): relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(math.o): relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(padx.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(philes.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(setcolor.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(setkey.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(spfiles.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(transfrm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(trim.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(xhelp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(errsys.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(tclass.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(tobject.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(direct.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(file.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbcrc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbstrfmt.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(alert.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(objfunc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(valtoexp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(arc4.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libgtcgi.a(gtcgi.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(dbcmd.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(workarea.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(wacore.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(wafunc.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(rddsys.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrdd.a(dbf1.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/librddntx.a(dbfntx1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/librddfpt.a(dbffpt1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macroy.o): relocation R_X86_64_32S against symbol `hb_macro_ExprTable' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macroa.o): relocation R_X86_64_32S against symbol `hb_macro_ExprTable' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macrob.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbmacro.a(macrolex.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(expropt1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(expropt2.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(funcid.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbdate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbffind.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbfsapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbprintf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbstr.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbver.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbcommon.a(hbverdsp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbvm.a(eval.o): relocation R_X86_64_32 against symbol `hb_symEval' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbrtl.a(hbregexc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcrecomp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcreconf.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcredfa.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcreexec.o): relocation R_X86_64_32S against symbol `_pcre_ucd_stage1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcrefinf.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcreoutf.o): relocation R_X86_64_32 against symbol `_pcre_utf8_table1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcrestud.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcrevutf.o): relocation R_X86_64_32S against symbol `_pcre_utf8_table4' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbpcre.a(pcrexcls.o): relocation R_X86_64_32S against symbol `_pcre_ucd_stage1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbzlib.a(deflate.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbzlib.a(trees.o): relocation R_X86_64_32S against symbol `_length_code' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbzlib.a(zutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /usr/lib/harbour/libhbzlib.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
hbmk2[compila]: Error: Running linker. 1
gcc '/tmp/hbmk_AEwLVb.dir/main.o' '/tmp/hbmk_AEwLVb.dir/hbmk_g2HDcc.o'   -Wl,--start-group -lhwgui -lprocmisc -lhbxml -lhwgdebug -lm -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -ldl -lrt -lhbpcre -lhbzlib -lgpm   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype  -Wl,--end-group -o'hwgui_test' -L/usr/lib/harbour -L'/home/sergio/workspace/hwgui-code/hwgui' -L'/home/sergio/workspace/hwgui-code/hwgui/lib'

cannot find -lgpm

Enviado: 18 Jul 2021 16:01
por Itamar M. Lins Jr.
Olá!

Código: Selecionar todos

{linux}-fPIE
Tentou ai ?

Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 16:04
por Itamar M. Lins Jr.
Olá!
É no .hbp que vc coloca o PATH!
Não precisa do resto.

Código: Selecionar todos

../lugar/onde/ta/o/hwgui.hbc
Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 16:21
por sergiosouzalima
Ficou assim agora

* Incluir o -fPIE no compila.hbp

Código: Selecionar todos

#
# $Id: compila.hbp $
#

-w0
-gc3
-ohwgui_test
-lhwgui

-L/home/sergio/workspace/hwgui-code/hwgui
-L/home/sergio/workspace/hwgui-code/hwgui/lib
-i/home/sergio/workspace/hwgui-code/hwgui/include

hwgui.hbc

# Special parameters for LINUX/GTK
{linux}-fPIE
{linux}-lm
{linux}-static
{linux}-d__LINUX__
{linux}-d__GTK__


main.prg
* Compilacao:

Código: Selecionar todos

$ hbmk2 compila.hbp
Error F0035  Bad command-line parameter '-fPIE'
hbmk2[compila]: Error: Running Harbour compiler (built-in). 1
(/usr/bin/harbour) -n2 main.prg -w0 -gc3 -q -m -n -es2 -DHBMK_HAS_HWGUI=1 -fPIE -d__LINUX__ -d__GTK__ -o/tmp/hbmk_tTE4Gq.dir/ -i/usr/include/harbour -i/home/sergio/workspace/hwgui-code/hwgui/include

cannot find -lgpm

Enviado: 18 Jul 2021 16:25
por Itamar M. Lins Jr.
Olá!
Vc que compilou os fontes do harbour ?
Pq eu nunca peguei esse erro.

Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 16:27
por Itamar M. Lins Jr.
Olá!

Código: Selecionar todos

Harbour Make (hbmk2) 3.2.0dev (r2017-12-15 18:53)
Baixar o Harbour do GIT e compilar ele sem inventar nada. (parâmetro nenhum)
Essa versão sua é antiga.

Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 16:29
por Itamar M. Lins Jr.
Olá!
https://pctoledo.org/forum/viewto ... 60#p151007

Saudações,
Itamar M. Lins Jr.

cannot find -lgpm

Enviado: 18 Jul 2021 16:56
por sergiosouzalima
Olá!

Sensacional! Funcionou, obrigado!

Seguem o passos abaixo para ficar o registro.

* Usei os comandos para instalar o Harbour:

Código: Selecionar todos

$ git clone --depth=10 https://github.com/harbour/core.git hb32
$ cd hb32/
$ sudo make install
* Agora a versão está atual:

Código: Selecionar todos

$ hbmk2 --version
Harbour Make (hbmk2) 3.2.0dev (r2021-04-28 18:02)
Copyright (c) 1999-present, Viktor Szakats
https://github.com/harbour/core/
* O compila.hbp ficou assim:

Código: Selecionar todos

#
# $Id: compila.hbp $
#

-w0
-gc3
-ohwgui_test
-lhwgui

-L/home/sergio/workspace/hwgui-code/hwgui
-L/home/sergio/workspace/hwgui-code/hwgui/lib
-i/home/sergio/workspace/hwgui-code/hwgui/include

hwgui.hbc

# Special parameters for LINUX/GTK
{linux}-lm
{linux}-static
{linux}-d__LINUX__
{linux}-d__GTK__

main.prg
* Compilação funcionando, com sucesso!

Código: Selecionar todos

$ hbmk2 compila.hbp 
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
sergio@sergio-Parallels-Virtual-Platform:~/workspace/github/sergiosouzalima@gmail.com/hwgui_test$
$ ll
total 1984
drwxrwxr-x 2 sergio sergio    4096 Jul 18 16:44 ./
drwxrwxr-x 9 sergio sergio    4096 Jul 17 18:32 ../
-rw-rw-r-- 1 sergio sergio     314 Jul 18 16:44 compila.hbp
-rwxrwxr-x 1 sergio sergio 2013928 Jul 18 16:44 hwgui_test*
-rw-rw-r-- 1 sergio sergio     688 Jul 18 11:23 main.prg
* Execução (imagem):
Execução exemplo Harbour + HwGUI
Execução exemplo Harbour + HwGUI