Lcnc 2.10 -- halcompile for kins

More
25 Oct 2023 23:03 #283832 by bkt
when try to run halcopile on Lcnc2.10 on linuxcnc-dev/src/emc/kinematics folder obtain an error .... for test I modify scarakins.c and try to compile with halcompile ....
sudo halcompile --compile scarakins.c
Compiling realtime scarakins.c
Linking scarakins.so
/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
/usr/share/linuxcnc/Makefile.modinc:121: recipe for target 'scarakins.so' failed
make: *** [scarakins.so] Error 1

I'm doing it wrong?

any suggest accept.

regards

Please Log in or Create an account to join the conversation.

More
25 Oct 2023 23:14 #283833 by tommylight
/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
Means there is a typo in the version script, makes me think the version in the script and the one you re trying to compile are not the same.

Please Log in or Create an account to join the conversation.

More
26 Oct 2023 00:16 #283835 by andypugh
I am a bit confused about what this VERSION script is.

The only VERSION I know of shouldn't be relevant.

what does

sudo find / -name VERSION

turn up?
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

More
27 Oct 2023 06:05 #283893 by bkt

/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
Means there is a typo in the version script, makes me think the version in the script and the one you re trying to compile are not the same.

I agree ... but for test I use exacly the same kins install from github .... because I've the same problem with old install .... for install for first download zip file from github, than in linuxcnc-dev/src  -> ./autogen.sh than  ./configure --with-realtime=uspace than make than sudo make setuid than .....rip-.... than runtest than ... cd.. + cd debian + ./configure uspace + cd.. + dpkg-buildpackage -b -uc ... after install deb package (userspace + dev + dbxxx) .... so not understand why different VERSION ....

Please Log in or Create an account to join the conversation.

More
27 Oct 2023 08:26 - 27 Oct 2023 08:33 #283898 by bkt

I am a bit confused about what this VERSION script is.

The only VERSION I know of shouldn't be relevant.

what does

sudo find / -name VERSION

turn up?

 

thnks to suggest to check what VERSION is but personally what I find not help .... maybe you can see where problem is ... the output:

Warning: Spoiler!
Last edit: 27 Oct 2023 08:33 by bkt.

Please Log in or Create an account to join the conversation.

More
27 Oct 2023 08:36 #283899 by bkt
only guess I can make is  related to more than one python version ..... but think is not righ things ....

Please Log in or Create an account to join the conversation.

More
27 Oct 2023 09:15 #283900 by bkt
i try again with same problem ....
testPc@mark28:~$ sudo halcompile --compile '/home/testPc/linuxcnc-master/src/emc/kinematics/scarakins.c'
Compiling realtime scarakins.c
Linking scarakins.so
/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
collect2: error: ld returned 1 exit status
/usr/share/linuxcnc/Makefile.modinc:121: recipe for target 'scarakins.so' failed
make: *** [scarakins.so] Error 1
testPc@mark28:~$


modinc file at that line is:
ifeq ($(BUILDSYS),uspace)
EXTRA_CFLAGS += -DSIM -fPIC
allmodules = $(patsubst %.o,%.so,$(obj-m))
modules: $(allmodules)

install: modules
    cp $(allmodules) $(DESTDIR)$(RTLIBDIR)/

getobjs = $(if $(filter undefined, $(origin $(1)-objs)), $(1).o, $($(1)-objs))
getsrcs = $(patsubst %.o,%.c,$(call getobjs,$(1)))

maks := $(patsubst %.o,.%.modinc,$(obj-m))
$(foreach mod,$(patsubst %.o,%,$(obj-m)),\
    $(eval $(mod).so: $(call getobjs,$(mod))))
%.o: %.c
    $(ECHO) Compiling realtime $<
    $(Q)$(CC) -o $@ $(EXTRA_CFLAGS) -c $<

.PHONY: %.so
%.so:
#####121 line -> ECHO .... think "receipe for targhet ....."#######
    $(ECHO) Linking $@
    $(Q)ld -d -r -o $*.tmp $^
    $(Q)objcopy -j .rtapi_export -O binary $*.tmp $*.sym
    $(Q)(echo '{ global : '; tr -s '\0' < $*.sym | xargs -r0 printf '%s;\n' | grep .; echo 'local : * ; };') > $*.ver
    $(Q)$(CC) -shared -Bsymbolic $(LDFLAGS) -Wl,--version-script,$*.ver -o $@ $^ -lm $(EXTRA_LDFLAGS)
    $(Q)chmod -x $@
endif

Please Log in or Create an account to join the conversation.

More
28 Oct 2023 06:19 #283934 by bkt

/usr/bin/ld:scarakins.ver:2: syntax error in VERSION script
Means there is a typo in the version script, makes me think the version in the script and the one you re trying to compile are not the same.

If I compile a scarakins.c kins without using switchkins.h and kinematics.h compile whitout problem .... what means? need to compile using make etc etc? I understand that procedure was valid only for Lcnc-dev rip-install version .... not for .deb install too ....

Please Log in or Create an account to join the conversation.

More
28 Oct 2023 08:37 - 28 Oct 2023 11:11 #283936 by bkt
after long search seems problem become from ld-2.27.so
really the most suggestion googling is "ld linker error" .... and I suppose depends from ld-2.27.so ....
..... so now seach for workaround ...
Last edit: 28 Oct 2023 11:11 by bkt.

Please Log in or Create an account to join the conversation.

More
28 Oct 2023 09:27 #283940 by andypugh
No real help, but I see the same problem.

Googling for "syntax error in VERSION script" indicates that this isn't an unknown issue in other places, but the causes can be rather random.

Sadly, the workaround is probably to compile run-in-place then move the generated .so to where it is needed.
The following user(s) said Thank You: bkt

Please Log in or Create an account to join the conversation.

Time to create page: 0.156 seconds
Powered by Kunena Forum