Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Problems when compiling Linux plugin  (Read 1470 times)
0 Members and 1 Guest are viewing this topic.
Offline gilead

Senior Newbie





« Posted 2004-08-24 21:24:01 »

I'm not sure if I should file a bug about it because I suspect I might be doing something wrong. Here is what I was getting when trying to build JInput from CVS on GNU/Linux 2.4.26 by issuing 'ant' command in source root:

Quote

Buildfile: build.xml

init:

core:

init:

compile:
   [javac] Compiling 17 source files to /home/max/projects/jinput_2004-08-25/coreAPI/classes

jar:
     [jar] Building jar: /home/max/projects/jinput_2004-08-25/coreAPI/bin/jinput.jar
    [copy] Copying 1 file to /home/max/projects/jinput_2004-08-25/plugins/DX8/lib

all:
    [echo] JInput has been built and jinput.jar is located in the bin directory.

windows_plugin:

linux_plugin:

init:
   [mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/classes
   [mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/bin

compileNativeJinputLib:

init:
   [mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/src/native/build
   [mkdir] Created dir: /home/max/projects/jinput_2004-08-25/plugins/linux/src/native/apidoc

compileNativeJinputLib:
    [exec] In file included from EventDevice.h:32,
    [exec]                  from jinput.cpp:37:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'
    [exec] In file included from EventDevice.h:32,
    [exec]                  from eventInterface.cpp:37:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'
    [exec] In file included from EventDevice.cpp:27:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'
    [exec] EventDevice.cpp: In member function `virtual int EventDevice::poll()':
    [exec] EventDevice.cpp:337: error: `EV_RST' undeclared (first use this function)
    [exec] EventDevice.cpp:337: error: (Each undeclared identifier is reported only once
    [exec]    for each function it appears in.)
    [exec] In file included from JoystickDevice.h:32,
    [exec]                  from joystickInterface.cpp:37:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'
    [exec] In file included from JoystickDevice.cpp:27:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'
    [exec] In file included from MixedDevice.cpp:27:
    [exec] eventInterfaceTypes.h:16: error: redefinition of `struct input_absinfo'
    [exec] /usr/include/linux/input.h:49: error: previous definition of `struct
    [exec]    input_absinfo'


    [exec] Result: 1

BUILD FAILED


I needed to apply these changes to make it compile:

Quote

Index: plugins/linux/src/native/EventDevice.cpp
===================================================================
RCS file: /cvs/jinput/plugins/linux/src/native/EventDevice.cpp,v
retrieving revision 1.3
diff -u -r1.3 EventDevice.cpp
--- plugins/linux/src/native/EventDevice.cpp    21 Apr 2004 09:48:54 -0000      1.3
+++ plugins/linux/src/native/EventDevice.cpp    24 Aug 2004 23:15:27 -0000
@@ -190,7 +190,7 @@
        sprintf(errorMessage, "Error reading device %s\n", deviceFileName);
        perror(errorMessage);
      }
-      absAxesData = abs_features.curr_value;
+      absAxesData = abs_features.value;
    }
  }

@@ -334,9 +334,11 @@
        //printf("abs axis %d translates to abs axis %d on this device\n", events.code, axisIndex);
        break;
      }
+/*
      case EV_RST:
        // not sure what to do here, doing nothing seems to work Smiley
        break;
+*/
      case EV_LED:
        // reveiced for things like numlock led change
        break;
@@ -363,11 +365,11 @@
}

int EventDevice::getAbsAxisMinimum(int axisNumber) {
-  return abs_features[axisNumber].min_value;
+  return abs_features[axisNumber].minimum;
}

int EventDevice::getAbsAxisMaximum(int axisNumber) {
-  return abs_features[axisNumber].max_value;
+  return abs_features[axisNumber].maximum;
}

int EventDevice::getAbsAxisFuzz(int axisNumber) {
Index: plugins/linux/src/native/eventInterfaceTypes.h
===================================================================
RCS file: /cvs/jinput/plugins/linux/src/native/eventInterfaceTypes.h,v
retrieving revision 1.1
diff -u -r1.1 eventInterfaceTypes.h
--- plugins/linux/src/native/eventInterfaceTypes.h      31 Jul 2003 19:34:46 -0000      1.1
+++ plugins/linux/src/native/eventInterfaceTypes.h      24 Aug 2004 23:15:27 -0000
@@ -13,6 +13,7 @@
        uint16_t version;
};

+/*
struct input_absinfo {
  int curr_value;
  int min_value;
@@ -20,5 +21,6 @@
  int fuzz;
  int flat;
};
+*/

#endif //eventInterfaceTypes_h


Am I doing something wrong?
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2004-08-26 10:18:41 »

Hi
 I'm not sure of the state on 2.4, as I've never compiled it there. It was always designed for 2.6. I might have a look over the weekend if I have time.

Cheers

Endolf

Offline gilead

Senior Newbie





« Reply #2 - Posted 2004-08-26 20:08:03 »

Thanks for help, I posted small patch which seems to fix 2.4-related problems at https://jinput.dev.java.net/issues/show_bug.cgi?id=31 but it'll need to be improved so please take a look at it.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline TheBohemian

Junior Devvie




Java will rule them all!


« Reply #3 - Posted 2004-08-26 20:43:49 »

Some time ago I have written two variants of the Linux based plugin. One of them is actually SDL based and may be usable with other OSes to.

Here are the sources:
http://www.inf.fu-berlin.de/~rschuste/java/jinput/linux-eventinterface-jinput-plugin-0.1-src.zip
http://www.inf.fu-berlin.de/~rschuste/java/jinput/sdl-jinputplugin-linux-0.1-src.zip

Both have an Ant build script and feature API documentation.

I made these plugins because development of JInput seems to be very slow and community participation is bad. I would love to see someone wanting to improve this situation ...

You mentioned that awkward installation mechanism. Have a look at the thread by me which was made sticky. It explains other variants.

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline gilead

Senior Newbie





« Reply #4 - Posted 2004-08-26 21:44:17 »

Quote
Some time ago I have written two variants of the Linux based plugin. One of them is actually SDL based and may be usable with other OSes to.

Thanks for the links!

Quote
You mentioned that awkward installation mechanism. Have a look at the thread by me which was made sticky. It explains other variants.

Errr.. right. Must've overlooked it Roll Eyes
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #5 - Posted 2004-08-27 06:24:00 »

Quote
Some time ago I have written two variants of the Linux based plugin. One of them is actually SDL based and may be usable with other OSes to.


You may or not be aware, that the coreAPI is having a little change. It's almost done, but i'll be asking for some testers soon. This will mean *all* plugins will need some rewritting as Axis is renamed Component, and the Identifiers have changed. I've updated the DX8 plugin and the linux plugin. It's not a major change, but it won't build without/run without the change.

Endolf

Offline TheBohemian

Junior Devvie




Java will rule them all!


« Reply #6 - Posted 2004-08-27 08:21:38 »

Quote

You may or not be aware, that the coreAPI is having a little change. It's almost done, but i'll be asking for some testers soon. This will mean *all* plugins will need some rewritting as Axis is renamed Component, and the Identifiers have changed.


No problem with that. Hopefully there will be a little summary about the changes then Smiley

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #7 - Posted 2004-08-27 08:25:20 »

Maybe Smiley

Somewhere in this thread. your compile errors will give it away though Tongue

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (37 views)
2014-12-09 22:41:13

BurntPizza (73 views)
2014-12-08 04:46:31

JscottyBieshaar (34 views)
2014-12-05 12:39:02

SHC (47 views)
2014-12-03 16:27:13

CopyableCougar4 (42 views)
2014-11-29 21:32:03

toopeicgaming1999 (110 views)
2014-11-26 15:22:04

toopeicgaming1999 (96 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!