[SOLVED] compiling jpcap on 64bit system

hello
can i compile jpcap on arch x86_64?
because when i try it i get this error:
/usr/bin/ld: /tmp/ccWFe5Db.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/tmp/ccWFe5Db.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libjpcap.so] Error 1
i tried to serach web but i just found out that this is architecture issue but no solution..
edit:
if i use 32bit enviroment (http://wiki.archlinux.org/index.php/Arc … bit_system) to compile it will it wrok on my 64 bit?
Last edited by _dunmer (2009-02-28 13:15:28)

this is whole makefile
JAVA_DIR = $(JAVA_HOME)
JNI_INCLUDE = $(JAVA_DIR)/include
# try to detect your OS using 'uname'
PLATFORM = $(shell "uname")
ifeq ($(PLATFORM), Linux)
JNI_INCLUDE2 = $(JAVA_DIR)/include/linux
COMPILE_OPTION = -shared -L.
SUFFIX = .so
else
ifeq ($(PLATFORM), FreeBSD)
JNI_INCLUDE2 = $(JAVA_DIR)/include/freebsd
COMPILE_OPTION = -shared -L.
SUFFIX = .so
else
ifeq ($(PLATFORM), SunOS)
JNI_INCLUDE2 = $(JAVA_DIR)/include/solaris
COMPILE_OPTION = -G
SUFFIX = .so
else
ifeq ($(PLATFORM), Darwin)
JNI_INCLUDE2 = /System/Library/Frameworks/JavaVM.framework/Headers
COMPILE_OPTION = -bundle -framework JavaVM
SUFFIX = .jnilib
endif
endif
endif
endif
# Specify where pcap.h is
PCAP_INCLUDE = /usr/include
#PCAP_INCLUDE = /usr/include/pcap
#CC = cl
CC = gcc
all: libjpcap.so
libjpcap.so: JpcapCaptor.c JpcapSender.c JpcapWriter.c\
packet_arp.c packet_datalink.c packet_icmp.c packet_ip.c\
packet_ipv6.c packet_tcp.c packet_udp.c
$(CC) $(COMPILE_OPTION) -I$(JNI_INCLUDE) -I$(JNI_INCLUDE2)\
-I$(PCAP_INCLUDE)\
JpcapCaptor.c JpcapSender.c JpcapWriter.c\
packet_arp.c packet_datalink.c packet_icmp.c packet_ip.c\
packet_ipv6.c packet_tcp.c packet_udp.c\
-o libjpcap$(SUFFIX) -lpcap
clean:
-rm libjpcap$(SUFFIX)
witt thie make file i get this error:
[dunmer@joybox c]$ make
gcc -shared -L. -I/opt/java/include -I/opt/java/include/linux\
-I/usr/include\
JpcapCaptor.c JpcapSender.c JpcapWriter.c\
packet_arp.c packet_datalink.c packet_icmp.c packet_ip.c\
packet_ipv6.c packet_tcp.c packet_udp.c\
-o libjpcap.so -lpcap
JpcapCaptor.c: In function 'Java_jpcap_JpcapCaptor_processPacket':
JpcapCaptor.c:467: warning: cast to pointer from integer of different size
JpcapCaptor.c: In function 'Java_jpcap_JpcapCaptor_loopPacket':
JpcapCaptor.c:486: warning: cast to pointer from integer of different size
JpcapCaptor.c: In function 'dispatcher_handler':
JpcapCaptor.c:700: warning: cast from pointer to integer of different size
JpcapWriter.c: In function 'Java_jpcap_JpcapWriter_close':
JpcapWriter.c:47: warning: incompatible implicit declaration of built-in function 'free'
packet_icmp.c: In function 'analyze_icmp':
packet_icmp.c:79: warning: cast to pointer from integer of different size
packet_icmp.c:81: warning: cast from pointer to integer of different size
/usr/bin/ld: /tmp/cceBND7o.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/tmp/cceBND7o.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libjpcap.so] Error 1
when i add -fPIC to CFLAGS it doesn't do anything and i get the same output
somebody tell me to chanege Linux part of make file like this:
ifeq ($(PLATFORM), Linux)
JNI_INCLUDE2 = $(JAVA_DIR)/include/linux
-- COMPILE_OPTION = -shared -L.
++ COMPILE_OPTION = -shared -fPIC -L.
whit this a i get another error:
[dunmer@joybox c]$ make
gcc -I/opt/java/include -I/opt/java/include/linux\
-I/usr/include\
JpcapCaptor.c JpcapSender.c JpcapWriter.c\
packet_arp.c packet_datalink.c packet_icmp.c packet_ip.c\
packet_ipv6.c packet_tcp.c packet_udp.c\
-o libjpcap.so -lpcap
JpcapCaptor.c: In function 'Java_jpcap_JpcapCaptor_processPacket':
JpcapCaptor.c:467: warning: cast to pointer from integer of different size
JpcapCaptor.c: In function 'Java_jpcap_JpcapCaptor_loopPacket':
JpcapCaptor.c:486: warning: cast to pointer from integer of different size
JpcapCaptor.c: In function 'dispatcher_handler':
JpcapCaptor.c:700: warning: cast from pointer to integer of different size
JpcapWriter.c: In function 'Java_jpcap_JpcapWriter_close':
JpcapWriter.c:47: warning: incompatible implicit declaration of built-in function 'free'
packet_icmp.c: In function 'analyze_icmp':
packet_icmp.c:79: warning: cast to pointer from integer of different size
packet_icmp.c:81: warning: cast from pointer to integer of different size
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.3/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [libjpcap.so] Error 1
nothing i could find about -fPIC helped me..

Similar Messages

  • [Solved] 32bits app on 64bits system

    Hi,
    I get the following message when trying to execute the anubis program :
    $ anubis
    bash: /usr/bin/anubis: Aucun fichier ou dossier de ce type
    (which means No such file or directory)
    The file exists so I guess the probem is that anubis is a 32bits prog and my system is arch64.
    According to the wiki it is possible to execute a 32bits app on a 64bits system if I install the lib32 libraries.
    So which library should I install ?
    WIll these solve my problem ?
    Last edited by Nanor (2011-07-22 09:56:57)

    loafer wrote:
    multilib is a repo rather than a package.  See here:
    https://wiki.archlinux.org/index.php/Ar … _Arch64.3F
    oh sh*t you're right... i forgot ,thanks for the right link this will answer his problem.
    i'm running a multilib system to due flash problems.......
    Last edited by gregor (2011-07-22 09:42:42)

  • Generating 32 bit code on 64bit system

    redhat el4 update 3, 2.6.9-34.ELsmp on a sun w2100z
    With the Solaris x86 compiler the default is 32 bit code even
    on a 64 bit system. Is a way to get 32 bit code generated on
    a 64bit system with the Linux version? Other than running
    on a 32 bit system (which works fine).
    mw

    As a general rule, you should try using appropriate gcc flag if that functionality is not covered in our compilers -flags output. If neither provides the needed functionality, ask, something could have been overlooked.
    Chris, I don't think we have new flags mentioned anywhere yet, docs update is scheduled to happen later, somewhere closer to release. We could make a list of adopted gcc-style flags.

  • Could not locate compiled schema resource schema/system/s1130C5BD40C5682431D4FD64179031DE/index.xsb

    can somebody pleas tell me why is xmlbeans looking for an index.xsb? i cant run
    my java classes because it is looking for this file. how can i solve this?

    Unfortunately the generated error messages are really misleading. Nevertheless
    I was able to find the solution.
    The orginal error message was:
    Caused by: java.lang.RuntimeException: Could not instantiate SchemaTypeSystemImpl
    (java.lang.reflect.InvocationTargetException): is the version of xbean.jar correct?
    I tried to locacate the error somewhere in the implementation of XMLBeans, but
    no success. Afterwards I included an printStackTrace() command in the code section
    where the error has been thrown and the more detailed error message was:
    Could not locate compiled schema resource schema/system/sC8870485F5E7AEB8A9BBEB56FEB321E8/index.xsb
    Obviously the schema resource has not been compiled. Then I looked in the parameters
    of scomp and found:
    H:\UserData\SunONE\XMLBeans>scomp
    Compiles a schema into XML Bean classes and metadata.
    Usage: scomp [opts] [dirs]* [schema.xsd]* [service.wsdl]* [config.xsdconfig]*
    Options include:
    -cp [a;b;c] - classpath
    -d [dir] - target binary directory for .class and .xsb files
    Obviously the xsb Files are not generated, if the target binary directory is not
    explicitly mentioned. Therefore I modified the compile command to
    H:\UserData\SunONE\XMLBeans>scomp -src GenClasses -d GenClasses -out myMainData.
    jar MainData21.xsd
    and, voila, it works!!!!!

  • Install coldfusion 8 32 bit on 64bit system

    in agreement with docs
    http://kb2.adobe.com/cps/403/kb403277.html#main__Toc193176416
    ("As of ColdFusion 8 Update 1, the Standard Edition can run as a 32-bit application on all supported 64-bit platforms in addition to 32-bit platforms")
    i'm trying to install coldfusion-801-lin.bin on
    a linux 64bit system
    but i receive this error
    [root@lnx1 store]# ./coldfusion-801-lin.bin
    Preparing to install...
    Extracting the JRE from the installer archive...
    Unpacking the JRE...
    Extracting the installation resources from the installer archive...
    Configuring the installer for this system's environment...
    strings: '/lib/libc.so.6': No such file
    Launching installer...
    ./coldfusion-801-lin.bin: /tmp/install.dir.9137/Linux/resource/jre/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
    ./coldfusion-801-lin.bin: line 2479: /tmp/install.dir.9137/Linux/resource/jre/bin/java: Success
    =========
    if i tryng to install coldfusion-801 64bit version,
    the serial number is not valid
    (my serial number is CF standard, upg license)
    you can help me?
    many thanks!

    First, it would be a good idea for you to specify what distro of Linux you're using, as not all are supported by Adobe.
    Second, this is probably your problem right here:
    http://askubuntu.com/questions/40416/why-is-lib-libc-so-6-missing
    In a nutshell, CF expects the 32-bit version of libc.so.6 to be in /lib, but it's probably not. You might be able to modify the installer to point to the correct location for that file, or you might be able to create a symlink to the file - but as the above link describes, creating a symlink might have negative consequences.
    As for installing CF 8 64-bit, that's only available with Enterprise, not Standard. If you want CF Standard 64-bit, you need to upgrade to CF 9.
    Dave Watts, CTO, Fig Leaf Software

  • How to use VBScript to access a 32bit ODBC System DSN (Excel) on a Windows 7 64bit system?

    What is the correct way to connect to a 32bit System DSN (Excel) on a Windows 7 64bit system?
    I've recently switched from Windows XP Pro x32 to Windows 7 x64.  Now, one of my scripts that uses an ODBC connection will no longer work.  After a bit of searching, I discovered that Windows 7 x64 does not currently have 64bit Excel drivers.  However, you can set up 32-bit connections by running "C:\Windows\SysWOW64\odbcad32.exe".  Unfortunately, my script still won't work even though I set up the System DSN exactly like I did on my old computer.  When I run my script, I get the following error:
    Quote:
    Script:  X\XML_Check.vbs
    Line:  212
    Char:  3
    Error:  [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.
    Code:  80004005
    Source:  Microsoft OLE DB Provider for ODBC Drivers
    Line 212 contains:
    objConnection.Open "DSN=charge_codes_XLS;"
    It seemed to me that wscript.exe will only communicate properly with an identical environment (x32 to x32 or x64 to x64, but not x64 to x32 or x32 to x64).  With that in mind, I found a way around the error by running my script via the 32bit version of Windows Script Host.  I changed the shortcut path from "X:\XML_CHECK.vbs" to "C:\Windows\SysWOW64\wscript.exe X:\XML_CHECK.vbs" and the script appears to function ok. 
    What I really want to know is if there is a way to run my script via the 64bit version of wscript.exe yet have it connect to the 32bit ODBC subsystem? Is there a specific connection string I can use or am I just out of luck until Microsoft puts out 64bit Excel drivers?

    I faced the same issue recently. There was a 32bit MSOffice installed on the 64bit server and the same visual basic code worked from MS Office script debugger, and did not in the cscript/wscript.
    It seems that 
      - the  cscript/wscript used 64bit ODBC driver
      - the  office used     32bit ODBC driver
    Excel drivers are installed for 32bit ODBC (because of 32 bit office the ODBC manager 32bit was a full hand of drivers).
    Excel drivers are NOT installed for 64bit ODBC manager (because of 32 bit OFFICE) and can not be installed while the 32bit MS OFFICE is installed.
    The SQL drivers are installed for 64bit ODBC (so that is why the SQL connection was established well)
    The solution would be to run .js .vbs scripts in 32 bit environment:
    \windows\SysWOW64\cscript.exe or \windows\SysWOW64\wscript.exe 
    Search for more with: how do i run a vbscript in 32 bit mode on a 64 bit machine

  • I am running Windows 7 64Bit system and everything was working normal.  However, I am now getting an error message stating objc.dll is missing.  I've re-installed Itunes but to no avail.  How can I get this error message corrected?

    I am running Windows 7 64Bit system and everything was working normal.  However, I am now getting an error message stating objc.dll is missing.  I've re-installed Itunes but to no avail.  How can I get this error message corrected?

    See this User Tip by turingtest2
      https://discussions.apple.com/docs/DOC-6562

  • Error in Java compilation: \s7u.log (The system cannot find the file specified)

    Hi there,
    I got an error when I tried to compile a group of sqlj and java files. The error below:
    ----------------------------------------------sqlj -status -passes -compile=true -ser2class -d=. -classpath=.;%CLASSPATH% E:\work\src\java\com\interadnet\persistence\*.sqlj E:\work\src\java\com\interadnet\persistence\*.java
    out [Translating 53 files]
    out [Reading file AdServerInformationType]
    out [Reading file AdsType]
    out [Reading file AgencyType]
    out [Reading file CampaigntocompletionType]
    out [Reading file CampaignType]
    out [Reading file ChannelType]
    out [Reading file ClientType]
    out [Reading file CompletionType]
    out [Reading file ContactType]
    out [Reading file CreativeType]
    out [Reading file FtpServerType]
    out [Reading file InsertioninstructionType]
    out [Reading file MediaServerType]
    out [Reading file SystemPropertyType]
    out [Reading file VendorType]
    out [Reading file AdServerInformationTypeRef]
    out [Reading file AdServerInformationView]
    out [Reading file AdsTypeRef]
    out [Reading file AdsView]
    out [Reading file AgencyTypeRef]
    out [Reading file AgencyView]
    out [Reading file CampaigntocompletionTypeRef]
    out [Reading file CampaignToCompletionView]
    out [Reading file CampaignTypeRef]
    out [Reading file CampaignTypeRefs]
    out [Reading file CampaignView]
    out [Reading file ChannelTypeRef]
    out [Reading file ChannelTypeRefs]
    out [Reading file ChannelView]
    out [Reading file ClientTypeRef]
    out [Reading file ClientTypeRefs]
    out [Reading file ClientView]
    out [Reading file CompletionTypeRef]
    out [Reading file CompletionTypeRefs]
    out [Reading file CompletionView]
    out [Reading file ContactTypeRef]
    out [Reading file ContactView]
    out [Reading file CreativeTypeRef]
    out [Reading file CreativeTypeRefs]
    out [Reading file CreativeView]
    out [Reading file FtpServerTypeRef]
    out [Reading file FtpServerView]
    out [Reading file InsertioninstructionTypeRef]
    out [Reading file InsertioninstructionTypeRefs]
    out [Reading file InsertionInstructionView]
    out [Reading file MediaServerTypeRef]
    out [Reading file MediaServerView]
    out [Reading file SystemPropertyTypeRef]
    out [Reading file SystemPropertyTypeRefs]
    out [Reading file SystemPropertyView]
    out [Reading file VendorTypeRef]
    out [Reading file VendorTypeRefs]
    out [Reading file VendorView]
    out [Translating file AdServerInformationType]
    out [Translating file AdsType]
    out [Translating file AgencyType]
    out [Translating file CampaigntocompletionType]
    out [Translating file CampaignType]
    out [Translating file ChannelType]
    out [Translating file ClientType]
    out [Translating file CompletionType]
    out [Translating file ContactType]
    out [Translating file CreativeType]
    out [Translating file FtpServerType]
    out [Translating file InsertioninstructionType]
    out [Translating file MediaServerType]
    out [Translating file SystemPropertyType]
    out [Translating file VendorType]
    out [Translating file AdServerInformationTypeRef]
    out [Translating file AdServerInformationView]
    out [Translating file AdsTypeRef]
    out [Translating file AdsView]
    out [Translating file AgencyTypeRef]
    out [Translating file AgencyView]
    out [Translating file CampaigntocompletionTypeRef]
    out [Translating file CampaignToCompletionView]
    out [Translating file CampaignTypeRef]
    out [Translating file CampaignTypeRefs]
    out [Translating file CampaignView]
    out [Translating file ChannelTypeRef]
    out [Translating file ChannelTypeRefs]
    out [Translating file ChannelView]
    out [Translating file ClientTypeRef]
    out [Translating file ClientTypeRefs]
    out [Translating file ClientView]
    out [Translating file CompletionTypeRef]
    out [Translating file CompletionTypeRefs]
    out [Translating file CompletionView]
    out [Translating file ContactTypeRef]
    out [Translating file ContactView]
    out [Translating file CreativeTypeRef]
    out [Translating file CreativeTypeRefs]
    out [Translating file CreativeView]
    out [Translating file FtpServerTypeRef]
    out [Translating file FtpServerView]
    out [Translating file InsertioninstructionTypeRef]
    out [Translating file InsertioninstructionTypeRefs]
    out [Translating file InsertionInstructionView]
    out [Translating file MediaServerTypeRef]
    out [Translating file MediaServerView]
    out [Translating file SystemPropertyTypeRef]
    out [Translating file SystemPropertyTypeRefs]
    out [Translating file SystemPropertyView]
    out [Translating file VendorTypeRef]
    out [Translating file VendorTypeRefs]
    out [Translating file VendorView]
    out [Compiling 53 Java files]
    err*** The following character string is too long:
    err***
    out Error in Java compilation: \s7u.log (The system cannot find the file specified)
    Any suggestion appreciated.
    Daniel Huang

    Having not seen this before, I assume that the issue is that the command line string is too long when Javac is invoked.
    Here are a few things to reduce the size of the command line:
    - do not use the CLASSPATH option, but set the CLASSPATH environment variable (you can to that in a .bat file)
    - do not provide the .java files but rely on the implicit make capability in both, the SQLJ translator and the Java compiler. (Note: you must mention all of the .sqlj files that your program requires, do not rely on implicit make to find all of those.)
    - you can perform the -ser2class conversion as a separate step (see the SQLJ FAQ), as well as the Java compilation
    - there may or may not be a facility in your operating system to increase the size of the environment (and this may or may not have an effect on the maximum command line length)
    - you could try to omit the -passes option and see if that helps (that may actually be where your invocation if failing in the first place, in that it cannot write to some temporary file).
    Let us know how it goes. Thanks!

  • If I were to buy the 7 Home Premium SP1 64bit, System Builder OEM DVD 1 Pack from Amazon to install Microsoft Windows 7 on my Mac, would it be compatible with my computer when I put it in bootcamp? (I have all of the current software updates)

    If I were to buy the 7 Home Premium SP1 64bit, System Builder OEM DVD 1 Pack from Amazon to install Microsoft Windows 7 on my Macbook Pro, would it be compatible with my computer if I put it in bootcamp? (I have all of the current software updates)

    In order to run Windows Applications, you must own the applications and, since they require Windows, you must own Windows. There are technologies like wine that will allow Windows applications to run without Windows, but they tend to be flakey at best.

  • To request my serial number for Adobe After Effects to upgrade to 64bit system

    I have AE cs6 and I need to upgrade to 64bit system.
    How and where to request my serial number for Adobe After Effects to upgrade to a compatible 64-bit operating system? (because no customer service answered me)

    I don't understand your problem.
    After Effects CS6 runs on 64 bit systems.  You use the same serial number you use on a 32 bit system.
    If you want to upgrade to the CC subscription version, you can do so on the Adobe website.
    What do you mean that no customer service answered you?  Did you speak to Adobe Support?  What did they say?

  • Does DirectX 9.0c support 64bit system?

    I just know that 32bit dll doesn't work  with 64 bit system.
    so I wonder DirectX 9.0c is working with 64bit system?
    thanks for reading.
    have a nice day.

    Hi mastise,
    Thank you for posting in MSDN forum.
    Based on your issue, I did some research about this issue. I found that the Directx 9.0 c is working with the Windows XP Pro x64 Edition.
    For more information:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ee416805(v=vs.85).aspx
    https://msdn.microsoft.com/en-us/library/windows/desktop/ee416788(v=vs.85).aspx
    So please ensure what OS you install on your machine.
    If you have any issues about this Directx 9.0 c, I suggest you could post this issue directly to this Windows Develp forum for this Directx 9.0 c:https://msdn.microsoft.com/en-us/windows/desktop/aa904945.aspx
    , you will get more useful information.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is Firefox 4.0 now compatible with ZoneAlarm Browser 1.5.260.0 and Windows Vista Home Premium, 64Bit System, Service Pack 2?

    Is Firefox 4.0 now compatible with ZoneAlarm Browser 1.5.260.0 and Windows Vista Home Premium, 64Bit System, Service Pack 2? Earlier when checking for updates there were compatibility issues. Were these issues resolved to allow me secure operation with Firefox 4.0?

    I also am a zone alarm user and was not to happy about the issue with 4.0
    I use sky .fm for music and was not happy when it would not play. required update to latest flash,which didn't work no matter what. even the suggestion in another thread.

  • Installing qt5-32bit program on 64bit system

    I am trying to build a 32bit program that's using Qt 5 as toolkit on my 64bit system. For Qt 4 there's a lib32 package, for Qt 5 I cannot find any. How can I build this program without building Qt on my own when a lib32-qt5 package is missing?
    Thank you!
    Last edited by OlafLostViking (2014-05-13 00:13:28)

    Make the lib32-qt* packages yourself and trow them up on aur

  • Does the Developer Workplace also run on 64bit systems?

    I know that this is not a supported platform, it seems that the developer studio is inly supported on XP 32bit. But I like to make full use of my 4GB RAM and therefore install the whole NW CE 7.1 environment including JEE server and development studio on a 64bit system (Linux or Windows Server 2003). Does this work or won't it even install?
    Did anyone try this before? Will there be a new version in the near future that is supported to run on 64bit systems?

    Hi Srivastava,
    thanks for your reply. At least there is some hope now that it will run on 64 bit but from the various OSS notes I still do not get a clear picture. The notes you explicitly mentioned seem to be rather old. Now I found note 953763, which says:
    Supported Operating Systems for Development Systems
    If you want to install a SAP NetWeaver CE development system, the following operating systems are supported:
    Microsoft Windows XP Professional SP2 (or higher) (32-bit)
    Microsoft Windows 2003 Server SP1 (or higher) (64-bit)
    From that note I guess that also the installation of NetWeaver Developer Studio will work on Windows Server 2003 64-bit.
    Is anyone using this particular configuration?

  • How do you clean install CS6 on a new PC Win7 64bit system?

    How do you clean install CS6 on a new PC Win7 64bit system?
    I think I've upgraded all th way from Version 7.

    There is no problem. If no previous, activated software is detected on the system, the upgrade installer will simply revert to its secondary mode and request to input the old serial in a second step for verification. Unless you do some exotic crossgrade/ sidegrade stuff, this should work with no problems whatsoever.
    Mylenium

Maybe you are looking for