Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build instructions #35

Open
Br3nda opened this issue Aug 19, 2012 · 8 comments
Open

build instructions #35

Br3nda opened this issue Aug 19, 2012 · 8 comments

Comments

@Br3nda
Copy link

Br3nda commented Aug 19, 2012

how do i build this?

i ran generate-makefile.sh
then make

and i get a page or errors.

$ make
cd && rm -rfv ./bin
cd libusb/ && [ -f configure ] || sh autogen.sh
cd libusb/ && [ -f Makefile ] || ./configure
cd libusb/ && [ -f libusb/.libs/libusb-1.0.a ] || make
test -d bin/Debug || mkdir -p bin/Debug
test -d obj/Debug/src || mkdir -p obj/Debug/src
sh -c -x "gcc -Wall wx-config --cflags -Winvalid-pch -include wx_pch.h python-config --include pkg-config --libs --cflags glib-2.0 -DWX_PRECOMP -O3 -g -I/usr/include/libxml2 -Iinclude -Ilibusb/libusb -c src/AboutDialog.cc -o obj/Debug/src/AboutDialog.o"

  • gcc -Wall -I/usr/lib/i386-linux-gnu/wx/include/base-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DwxUSE_GUI=0 -pthread -Winvalid-pch -include wx_pch.h -I/usr/include/python2.7 -I/usr/include/python2.7 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -lglib-2.0 -DWX_PRECOMP -O3 -g -I/usr/include/libxml2 -Iinclude -Ilibusb/libusb -c src/AboutDialog.cc -o obj/Debug/src/AboutDialog.o
    In file included from src/AboutDialog.cc:2:0:
    include/AboutDialog.h:17:1: error: expected class-name before ‘{’ token
    include/AboutDialog.h:24:3: error: ‘wxStaticText’ does not name a type
    include/AboutDialog.h:25:3: error: ‘wxStaticBitmap’ does not name a type
    include/AboutDialog.h:26:3: error: ‘wxStaticText’ does not name a type
    include/AboutDialog.h:27:3: error: ‘wxStaticLine’ does not name a type
    src/AboutDialog.cc:16:48: error: ‘wxNewId’ was not declared in this scope
    src/AboutDialog.cc:17:61: error: ‘wxNewId’ was not declared in this scope
    src/AboutDialog.cc:18:58: error: ‘wxNewId’ was not declared in this scope
    src/AboutDialog.cc:19:53: error: ‘wxNewId’ was not declared in this scope
    src/AboutDialog.cc:22:1: error: ‘wxDialog’ has not been declared
    src/AboutDialog.cc: In constructor ‘AboutDialog::AboutDialog(wxWindow_, wxWindowID)’:
    src/AboutDialog.cc:30:2: error: ‘wxFlexGridSizer’ was not declared in this scope
    src/AboutDialog.cc:30:19: error: ‘primarySizer’ was not declared in this scope
    src/AboutDialog.cc:31:19: error: ‘contentSizer’ was not declared in this scope
    src/AboutDialog.cc:33:102: error: ‘wxSTAY_ON_TOP’ was not declared in this scope
    src/AboutDialog.cc:33:116: error: ‘wxDEFAULT_DIALOG_STYLE’ was not declared in this scope
    src/AboutDialog.cc:33:139: error: ‘wxSYSTEM_MENU’ was not declared in this scope
    src/AboutDialog.cc:33:153: error: ‘wxCLOSE_BOX’ was not declared in this scope
    src/AboutDialog.cc:33:180: error: ‘Create’ was not declared in this scope
    src/AboutDialog.cc:34:31: error: ‘SetClientSize’ was not declared in this scope
    src/AboutDialog.cc:35:21: error: expected type-specifier before ‘wxFlexGridSizer’
    src/AboutDialog.cc:35:21: error: expected ‘;’ before ‘wxFlexGridSizer’
    src/AboutDialog.cc:36:2: error: ‘libreScribeLogoBitmap’ was not declared in this scope
    src/AboutDialog.cc:36:30: error: expected type-specifier before ‘wxStaticBitmap’
    src/AboutDialog.cc:36:30: error: expected ‘;’ before ‘wxStaticBitmap’
    src/AboutDialog.cc:38:21: error: expected type-specifier before ‘wxFlexGridSizer’
    src/AboutDialog.cc:38:21: error: expected ‘;’ before ‘wxFlexGridSizer’
    src/AboutDialog.cc:39:2: error: ‘libreScribeVersionLabel’ was not declared in this scope
    src/AboutDialog.cc:39:32: error: expected type-specifier before ‘wxStaticText’
    src/AboutDialog.cc:39:32: error: expected ‘;’ before ‘wxStaticText’
    src/AboutDialog.cc:41:2: error: ‘aboutDialogSeparator’ was not declared in this scope
    src/AboutDialog.cc:41:29: error: expected type-specifier before ‘wxStaticLine’
    src/AboutDialog.cc:41:29: error: expected ‘;’ before ‘wxStaticLine’
    src/AboutDialog.cc:43:2: error: ‘descriptionText’ was not declared in this scope
    src/AboutDialog.cc:43:24: error: expected type-specifier before ‘wxStaticText’
    src/AboutDialog.cc:43:24: error: expected ‘;’ before ‘wxStaticText’
    src/AboutDialog.cc:46:23: error: ‘SetSizer’ was not declared in this scope
    src/AboutDialog.cc:48:9: error: ‘Center’ was not declared in this scope
    make: *_* [obj/Debug/src/AboutDialog.o] Error 1
@ethan3391
Copy link

I have a different dead end as follows:

make: *** [out_debug] Error 1

If anyone has any bits of wisdom as to my great difficulties I would be much obliged. I have been googling and troubleshooting the problem for a night and a day now.

@Br3nda As far as your dead end is concerned I decided to google it as well hoping that the solution might fix mine too, the result of which is a command line that should fix your problem.

sudo apt-get install automake libtool libwxgtk2.8-dev libudev-dev libopenobex1-dev libglib2.0-dev libsp-gxmlcpp-dev python2.7-dev python-dev

Good luck. From my experience in compiling programs, you may need it.

@ethan3391
Copy link

This looks a lot bigger than I already thought. It would seem that there are a large quantity of undefined references dealing with WxWidget. The code to follow:

[code removed]

@ethan3391
Copy link

Upon double checking, I have found that I installed plplot9-driver-wxwidgets, and libalien-wxwidgets-perl in order to deal with a previous issue. Could this be a coding issue or do I still need another program?

@ethan3391
Copy link

So I found the installation instructions that were on the wiki the whole time, and after following said instructions, like I should have in the first place, still no joy.

@Br3nda
Copy link
Author

Br3nda commented Aug 21, 2012

aha --- here: https://github.com/aliendude5300/LibreScribe/wiki

How about a link to that in a Readme file? That way it gets distributed everywhere with the source
(should I send a merge request?)

@ethan3391
Copy link

Well, for it to get done, that is probably what you will have to do. Personally I was expecting to find a readme somewhere in the download, and I think that's how it is for most people.So, that may be advantageous for the program in the long run.

@ethan3391
Copy link

Alright, after a little more time I have gotten the basic program to run. it is necessary to use the command line "sudo codeblocks" to open Code::Blocks, (in Ubuntu 12.04 that is) open the file "LibreScribe.cbp", and then use the option "Build and run."

[update] If you simply use the "run" button, you don't have to use the sudo command.[update]

Well, now that that's figured out. . .

As far as the readme is concerned, I would probably also include a copy of the wiki article and the tidbit I just finished discovering.

@Treaver
Copy link

Treaver commented Aug 27, 2012

Development Environment Setup (Ubuntu Linux; Debian instructions should be similar)
In order to build LibreScribe, you will need several packages installed. At the moment, this list is somewhat overkill, in order to ensure that all of the necessary dependencies are installed. This list may be missing a few dependencies, or contain unnecessary dependencies. Feel free to improve it if you can.

To install the necessary software so that you can build and develop LibreScribe, open a terminal and enter

sudo apt-get install build-essential codeblocks codeblocks-contrib libwxbase2.8-dbg libwxbase2.8-dev libwxgtk2.8-dbg libwxgtk2.8-dev wx2.8-headers wx-common wxformbuilder libopenobex1-dev libglib2.0-0-dbg eglibc-source libudev-dev libusb-dev libusb++-dev libusb-1.0-0-dev libxml.* libgtk2.0-dev libgnome2-dev git libwxsmithlib0 libtool autogen python-dev automake
Once you install all of those files, you will want to create a symbolic link to set the default version of wxWidgets to 2.8.

cd /usr/include

sudo ln -sv wx-2.8/wx wx
You're almost ready to work! First, change back to the directory you want your project to be in, such as your home directory.

cd $HOME
Finally, once you are in the directory where you want to have your LibreScribe files, clone the git repository.

git clone git://github.com/aliendude5300/LibreScribe.git
You should be able to build and run the project using Code::Blocks.

Configure USB access

On most Linux systems non-standard USB devices are not accessible for regular user. Simple work around to this problem is to run Librescrive with sudo:

sudo ./Librescribe
But more elegant solution is available: write udev rule to change access rights for LiveScribe usb devices.

You can create generic udev rule file to match all LiveScribe products:

sudo gedit /lib/udev/rules.d/50-livescribe.rules
Copy following text into that file:

#LiveScribe usb pen
SUBSYSTEM=="usb", ATTR{idVendor}=="1cfb", MODE="0666", GROUP="plugdev"
Save the file. Some systems require reboot for the new rule to take effect.

Note: I tested this udev rule file on Ubuntu 12.04 LTS 64bit system.

p.s. For more "clean" udev rules file see https://github.com/srwalter/libsmartpen/blob/master/75-smartpen.rules . This file list exact product IDs instead of just vendor ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants