This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- How to generate "lmflex.so" file ?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 12, 2018
02:06 AM
How to generate "lmflex.so" file ?
Hi all,
I want to generate lmflex.so from lmflex.c. Recently, I can only generate lmflex.o by editing "makefile" file.
If I use this command to build .so file, it will give an error
Command:
Error:
Any ideas to solve this. Thank you !
I want to generate lmflex.so from lmflex.c. Recently, I can only generate lmflex.o by editing "makefile" file.
lmflex: $(SRCDIR)/lmflex.c $(SRCDIR)/lm_code.h $(CLIENTLIB) lm_new.o
$(MAKE) lm_new.o
$(CC) -c $(CFLAGS_PIE) $(CFLAGS) $(SRCDIR)/lmflex.c
$(CC) $(CFLAGS) $(LDFLAGS_PIE) $(LDFLAGS) -o lmflex lmflex.o lm_new.o $(CLIENTLIB) $(ACTSTUB) $(XTRALIB) \
$(THREADLIB)
rm lmflex.o => remove this line
$(STRIP) lmflex
rm -f lm_new.o
If I use this command to build .so file, it will give an error
Command:
gcc lmflex.o -shared -o lmflex.so
Error:
/usr/bin/ld: lmflex.o: relocation R_X86_64_32 against `lm_job' can not be used when making a shared object; recompile with -fPIC
lmflex.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Any ideas to solve this. Thank you !
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 14, 2018
01:02 AM
Hi
I believe the default FNP toolkit comes with compiler options for "-fpic" defined as "CFLAGS". You can use the CFLAGS during compiler time (through makefile) and get the pic version for object files.
Regards,
Abhay
I believe the default FNP toolkit comes with compiler options for "-fpic" defined as "CFLAGS". You can use the CFLAGS during compiler time (through makefile) and get the pic version for object files.
Regards,
Abhay
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)