entylop / protobuf Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/protobuf
License: Other
Automatically exported from code.google.com/p/protobuf
License: Other
What steps will reproduce the problem?
InputStream bytes =
new ByteArrayInputStream(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
CodedInputStream codedBytes = CodedInputStream.newInstance(bytes);
int N = 1; // arbitrary value as long it fits in the buffer.
while (true) {
byte readByte = codedBytes.readRawByte();
System.out.println("readByte = " + readByte);
int M = N;
// Using M > N solves the problem.
int oldLimit = codedBytes.pushLimit(M);
codedBytes.skipRawBytes(N);
codedBytes.popLimit(oldLimit);
}
What is the expected output? What do you see instead?
Exepected is (and it is the case with M = 2:)
readByte = 1
readByte = 3
readByte = 5
readByte = 7
readByte = 9
But instead we have:
readByte = 1
readByte = 1
readByte = 1
readByte = 1
readByte = 1
What version of the product are you using? On what operating system?
Protobuf 2.0.0beta on Windows XP Pro SP2.
Original issue reported on code.google.com by [email protected]
on 29 Jul 2008 at 12:24
What steps will reproduce the problem?
1. Install a crosscompile-suite like eldk
2. configure like configure --build=i686-linux --host=powerpc-linux
3. make
What is the expected output? What do you see instead?
expected is a protoc for the cross-platform, this is ok, but the test with
this protoc will fail, because the protoc a binary of another architecture
What version of the product are you using? On what operating system?
1.0.0beta2
Please provide any additional information below.
A configure option like --no-test could reflect this issue
Original issue reported on code.google.com by [email protected]
on 16 Jul 2008 at 5:11
What steps will reproduce the problem?
1. mvn -e test
What is the expected output? What do you see instead?
Expected successful test but saw the following error...
C:\java\protobuf-2.0.0beta\java>c:\java\apache-maven-2.0.9\bin\mvn -e test
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Protocol Buffer Java API
[INFO] task-segment: [test]
[INFO] ------------------------------------------------------------------------
[INFO] [antrun:run {execution: generate-sources}]
[INFO] Executing tasks
[mkdir] Created dir:
C:\java\protobuf-2.0.0beta\java\target\generated-source
s
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks
Embedded error: Execute failed: java.io.IOException: CreateProcess:
..\src\proto
c --java_out=target/generated-sources --proto_path=../src
../src/google/protobuf
/descriptor.proto error=2
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant
task
s
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:583)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing
ant t
asks
at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
ntMojo.java:114)
at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
... 16 more
Caused by: Execute failed: java.io.IOException: CreateProcess:
..\src\protoc --j
ava_out=target/generated-sources --proto_path=../src
../src/google/protobuf/desc
riptor.proto error=2
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:620)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
ntMojo.java:108)
... 19 more
Caused by: java.io.IOException: CreateProcess: ..\src\protoc
--java_out=target/g
enerated-sources --proto_path=../src
../src/google/protobuf/descriptor.proto err
or=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:576)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:617)
... 24 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Thu Jul 10 23:02:04 EDT 2008
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------
What version of the product are you using? On what operating system?
Version 2.0.0Beta, Windows XP
Please provide any additional information below.
The above error tells me it can't find "../src", so I changed all the
references to "../src" to "src" in the pom.xml file. However, after that
change got the following error...
C:\java\protobuf-2.0.0beta\java>c:\java\apache-maven-2.0.9\bin\mvn -e test
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Protocol Buffer Java API
[INFO] task-segment: [test]
[INFO] ------------------------------------------------------------------------
[INFO] [antrun:run {execution: generate-sources}]
[INFO] Executing tasks
[exec] src/google/protobuf/descriptor.proto: No such file or directory
[exec] Result: -1
[INFO] Executed tasks
[INFO] Registering compile source root
C:\java\protobuf-2.0.0beta\java\target\generated-sources
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 20 source files to
C:\java\protobuf-2.0.0beta\java\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[19,0]
package com.google.protobuf.De
scriptorProtos does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[321,11]
cannot find symbol
symbol : class DescriptorProto
location: class com.google.protobuf.Descriptors.Descriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[346,11]
cannot find symbol
symbol : class MessageOptions
location: class com.google.protobuf.Descriptors.Descriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[431,18]
cannot find symbol
symbol : class DescriptorProto
location: class com.google.protobuf.Descriptors.Descriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[440,23]
cannot find symbol
symbol : class DescriptorProto
location: class com.google.protobuf.Descriptors.Descriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[506,11]
cannot find symbol
symbol : class FieldDescriptorProto
location: class com.google.protobuf.Descriptors.FieldDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[565,11]
cannot find symbol
symbol : class FieldOptions
location: class com.google.protobuf.Descriptors.FieldDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[645,18]
cannot find symbol
symbol : class FieldDescriptorProto
location: class com.google.protobuf.Descriptors.FieldDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[729,28]
cannot find symbol
symbol : class FieldDescriptorProto
location: class com.google.protobuf.Descriptors.FieldDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[46,11]
cannot find symbol
symbol : class FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[59,11]
cannot find symbol
symbol : class FileOptions
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[185,43]
cannot find symbol
symbol : class FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[244,18]
cannot find symbol
symbol : class FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[252,27]
cannot find symbol
symbol : class FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[958,11]
cannot find symbol
symbol : class EnumDescriptorProto
location: class com.google.protobuf.Descriptors.EnumDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[976,11]
cannot find symbol
symbol : class EnumOptions
location: class com.google.protobuf.Descriptors.EnumDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1009,18]
cannot find symbol
symbol : class EnumDescriptorProto
location: class com.google.protobuf.Descriptors.EnumDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1015,27]
cannot find symbol
symbol : class EnumDescriptorProto
location: class com.google.protobuf.Descriptors.EnumDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[677,39]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[687,34]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[690,33]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[693,53]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[693,25]
valueOf(java.lang.String) is
already defined in com.google.protobuf.Descriptors.FieldDescriptor.Type
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1118,11]
cannot find symbol
symbol : class ServiceDescriptorProto
location: class com.google.protobuf.Descriptors.ServiceDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1133,11]
cannot find symbol
symbol : class ServiceOptions
location: class com.google.protobuf.Descriptors.ServiceDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1155,18]
cannot find symbol
symbol : class ServiceDescriptorProto
location: class com.google.protobuf.Descriptors.ServiceDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1160,30]
cannot find symbol
symbol : class ServiceDescriptorProto
location: class com.google.protobuf.Descriptors.ServiceDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1059,11]
cannot find symbol
symbol : class EnumValueDescriptorProto
location: class com.google.protobuf.Descriptors.EnumValueDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1082,11]
cannot find symbol
symbol : class EnumValueOptions
location: class com.google.protobuf.Descriptors.EnumValueDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1085,18]
cannot find symbol
symbol : class EnumValueDescriptorProto
location: class com.google.protobuf.Descriptors.EnumValueDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1090,32]
cannot find symbol
symbol : class EnumValueDescriptorProto
location: class com.google.protobuf.Descriptors.EnumValueDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1198,11]
cannot find symbol
symbol : class MethodDescriptorProto
location: class com.google.protobuf.Descriptors.MethodDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1224,11]
cannot find symbol
symbol : class MethodOptions
location: class com.google.protobuf.Descriptors.MethodDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1227,18]
cannot find symbol
symbol : class MethodDescriptorProto
location: class com.google.protobuf.Descriptors.MethodDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[1236,29]
cannot find symbol
symbol : class MethodDescriptorProto
location: class com.google.protobuf.Descriptors.MethodDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[235,8]
cannot find symbol
symbol : class FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[236,10]
cannot find symbol
symbol : variable FileDescriptorProto
location: class com.google.protobuf.Descriptors.FileDescriptor
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[370,26]
package DescriptorProto does
not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[534,53]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[539,53]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[544,53]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[658,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[659,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[660,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[661,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[662,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[663,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[664,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[665,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[666,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[667,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[668,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[669,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[670,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[671,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[672,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[673,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[674,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[675,35]
package FieldDescriptorProto
does not exist
C:\java\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descriptors.ja
va:[700,54]
package FieldDescriptorProto
does not exist
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Compilation failure
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycl
eExecutor.java:579)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(Def
aultLifecycleExecutor.java:49
9)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycle
Executor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.jav
a:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultL
ifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExec
utor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:5
16)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.ja
va:451)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycl
eExecutor.java:558)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Jul 10 23:10:35 EDT 2008
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
C:\java\protobuf-2.0.0beta\java>
Original issue reported on code.google.com by [email protected]
on 11 Jul 2008 at 3:11
What steps will reproduce the problem?
1. install protoc.exe to PATH
2. 'cd' into 'src\python' folder
3. python setup.py test
What is the expected output? What do you see instead?
Should get successful test result only. But get the following instead
======================================================================
FAIL: testPrintExotic
(google.protobuf.internal.text_format_test.TextFormatTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\documents and
settings\shunb\desktop\protobuf-2.0.0beta\python\google
\protobuf\internal\text_format_test.py", line 82, in testPrintExotic
'repeated_int64: -9223372036854775808\n'
File "c:\documents and
settings\shunb\desktop\protobuf-2.0.0beta\python\google
\protobuf\internal\text_format_test.py", line 37, in CompareToGoldenText
self.CompareToGoldenLines(text, golden_text.splitlines(1))
File "c:\documents and
settings\shunb\desktop\protobuf-2.0.0beta\python\google
\protobuf\internal\text_format_test.py", line 43, in CompareToGoldenLines
''.join(difflib.ndiff(golden_lines, actual_lines)))
AssertionError: Text doesn't match golden. Diff:
repeated_int64: -9223372036854775808
repeated_uint64: 18446744073709551615
repeated_double: 123.456
- repeated_double: 1.23e+22
+ repeated_double: 1.23e+022
? +
- repeated_double: 1.23e-18
+ repeated_double: 1.23e-018
? +
repeated_string: "\000\001\007\010\014\n\r\t\013\\\'\""
----------------------------------------------------------------------
What version of the product are you using? On what operating system?
libprotoc 2.0.0 (windows binary)
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 9 Jul 2008 at 8:18
C++ bindings improperly define methods for the "bytes" type. As per the
documentation
message test {
required bytes data = 1;
}
Results in the following function to be generated.
test::set_data(const char *)
The bytes type is defined as completely binary data which may contain
embedded NULLs or no NULLs at all, however the set_data() method requires
it to be NULL terminated.
While there is a test::set_data(std::string &) method which will work, the
first one is most definitely improper. That method needs to be changed to:
test::set_data(const unsigned char*, size_t n);
Original issue reported on code.google.com by [email protected]
on 15 Jul 2008 at 1:33
I saw 4 items in the list of Featured Downloads:
1) protobuf-2.0.0beta.tar.bz2
2) protobuf-2.0.0beta.tar.gz
3) protobuf-2.0.0beta.zip
4) protoc-2.0.0beta-win32.zip
The 1st three are mostly self-explanatory.
why is the windows version named differently than others ?
thank you,
BR,
~A
Original issue reported on code.google.com by [email protected]
on 8 Jul 2008 at 10:14
I've downloaded the latest source and did a:
./configure && make && make test
And I got the following error:
./protoc google/protobuf/unittest.proto google/protobuf/unittest_import.proto
google/protobuf/unittest_mset.proto google/protobuf/unittest_optimize_for.proto
google/protobuf/unittest_embed_optimize_for.proto
google/protobuf/unittest_custom_options.proto
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto -I. --cpp_out=.
lt-protoc: ./google/protobuf/stubs/common.h:274: To
google::protobuf::internal::down_cast(From*) [with To = const
google::protobuf::UninterpretedOption*, From = const
google::protobuf::Message]: Assertion `f
== __null || dynamic_cast<To>(f) != __null' failed.
make[2]: *** [unittest_proto_middleman] Aborted
make[2]: Leaving directory `/tmp/protobuf-2.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/protobuf-2.0.2'
make: *** [all] Error 2
Original issue reported on code.google.com by [email protected]
on 9 Oct 2008 at 6:51
What steps will reproduce the problem?
1. in windows explorer right click on libprotobuf.dll and select properties
2. go to the version tab.
3. there should be version information
What is the expected output? What do you see instead?
I expect to see a version number and version information but there is none.
What version of the product are you using? On what operating system?
2.0.1. Windows XP
Please provide any additional information below.
Original issue reported on code.google.com by Adam.Schepis
on 20 Oct 2008 at 10:33
What steps will reproduce the problem?
1. Write a small test program to serialize a basic protobuf.
2. Link it to libprotobuf.a.
3. Run it.
What is the expected output? What do you see instead?
Expected: no segmentation fault
Actual: segmentation fault occurs
What version of the product are you using? On what operating system?
protobuf-2.0.0beta
Please provide any additional information below.
This has been reported to occur on Mac OS X 10.5.3 and 10.4.11.
Original issue reported on code.google.com by [email protected]
on 14 Jul 2008 at 9:16
What steps will reproduce the problem?
1. Create a new .proto file with a single message.
2. Name the first field in the message testfield (lowercase)
3. Name the secion fiend in the message testField (lowerCamelCase)
4. Run protoc on the file with C++ output.
What is the expected output? What do you see instead?
The expected output is a warning or error from protoc pointing out that the
names of the two
fields are in conflict, as it would if they were both the same case.
Instead, no warning or error is given, and the files are created. Because the
C++ output converts
the field names to lowercase, the output files will contain pairs of identical
methods (e.g.
has_testfield()) for the message class. This will cause the C++ compiler to
generate errors when
parsing these files.
What version of the product are you using? On what operating system?
Version 2.0.0 Beta on OS X 10.5.4 Intel
Please provide any additional information below.
This problem can also be reproduced using Java output by replacing "testfield"
with test_field.
Java will convert both to CamelCase, resulting in the same problem, again
without warning or
error.
A user must violate the style guidelines to reproduce this problem. However,
since the python
output does not change the case of field names, it could lead to situations
where proto files
created by a developer working on a project python are unusable by a C or Java
developer. This
problem can be worked around by renaming the conflicting fields, but in a large
.proto file, this
could be tedious. It may also confuse novice programmers.
Original issue reported on code.google.com by [email protected]
on 9 Jul 2008 at 5:21
The generated Java code does not include the @Override annotation on the
proper (any) methods. I have attached a simple patch which takes care of
the generated message code.
Original issue reported on code.google.com by [email protected]
on 3 Aug 2008 at 2:39
Attachments:
What steps will reproduce the problem?
1. Download
2. Unzip
3. make install
What is the expected output? What do you see instead?
Expected: typing "protoc" would not produce an error
Actual: It can't find the shared libraries, libprotobuf.so.0, etc
Basically, for me, 'make install' put the libraries in /usr/local/lib, but
protoc expected them to be in /usr/lib
What version of the product are you using? On what operating system?
protobuf-2.0.0beta
Ubuntu Gutsy Server Edition,
Linux damogran 2.6.22-14-server #1 SMP Tue Feb 12 08:27:05 UTC 2008 i686
GNU/Linux
Please provide any additional information below.
This could just be related to my machine somehow, but i'm not really sure.
Original issue reported on code.google.com by [email protected]
on 12 Aug 2008 at 5:46
In the Java code, DescriptorPool.addPackage calls
new PackageDescriptor(fullName, name, file)
The constructor for PackageDescriptor has this signature:
PackageDescriptor(String name, String fullName, FileDescriptor file)
Note the reversal of the parameters. I *suspect* this is harmless in most
cases, but I don't know enough to be sure.
Original issue reported on code.google.com by jonathan.skeet
on 22 Jul 2008 at 10:34
Hello, i have a debian etch on an ibook g3 (PowerPC).
During the compilation (with the command make), i have a fatal error:
can not write repeated_filed_unittest.o: illegal tracking.
Thanks.
Original issue reported on code.google.com by [email protected]
on 17 Jul 2008 at 9:35
The Python bindings' SerializeToString doesn't raise an exception on
missing required fields.
Steps to reproduce (using unittest_pb2.py):
>>> p = unittest.TestRequired()
>>> p.a = 42
>>> p.SerializeToString()
'\x08*'
Note that I didn't set required field 'b'.
Original issue reported on code.google.com by bradfitz
on 30 Jul 2008 at 10:12
There are a lot of widely used file extension for C++ source code (.cc, .C,
.cpp, .cxx) and headers (.h, .hpp, no extension at all).
It would be nice if one can tell protoc to use the file extensions that
better fits your actual project.
Original issue reported on code.google.com by [email protected]
on 29 Jul 2008 at 3:47
What steps will reproduce the problem?
The included source did not compile
Information:Compilation completed with 60 errors and 0 warnings
Information:60 errors
Information:0 warnings
C:\work\protobuf\protobuf-2.0.0beta\java\src\main\java\com\google\protobuf\Descr
iptors.java
Error:Error:line (19)package com.google.protobuf.DescriptorProtos does
not exist
Error:Error:line (506)cannot find symbol class FieldDescriptorProto
Error:Error:line (565)cannot find symbol class FieldOptions
Error:Error:line (645)cannot find symbol class FieldDescriptorProto
Error:Error:line (729)cannot find symbol class FieldDescriptorProto
Error:Error:line (46)cannot find symbol class FileDescriptorProto
Error:Error:line (59)cannot find symbol class FileOptions
Error:Error:line (185)cannot find symbol class FileDescriptorProto
Error:Error:line (244)cannot find symbol class FileDescriptorProto
Error:Error:line (252)cannot find symbol class FileDescriptorProto
Error:Error:line (321)cannot find symbol class DescriptorProto
Error:Error:line (346)cannot find symbol class MessageOptions
Error:Error:line (431)cannot find symbol class DescriptorProto
Error:Error:line (440)cannot find symbol class DescriptorProto
Error:Error:line (677)package FieldDescriptorProto does not exist
Error:Error:line (687)package FieldDescriptorProto does not exist
Error:Error:line (690)package FieldDescriptorProto does not exist
Error:Error:line (693)package FieldDescriptorProto does not exist
Error:Error:line (693)valueOf(java.lang.String) is already defined in
com.google.protobuf.Descriptors.FieldDescriptor.Type
Error:Error:line (958)cannot find symbol class EnumDescriptorProto
Error:Error:line (976)cannot find symbol class EnumOptions
Error:Error:line (1,009)cannot find symbol class EnumDescriptorProto
Error:Error:line (1,015)cannot find symbol class EnumDescriptorProto
Error:Error:line (1,118)cannot find symbol class ServiceDescriptorProto
Error:Error:line (1,133)cannot find symbol class ServiceOptions
Error:Error:line (1,155)cannot find symbol class ServiceDescriptorProto
Error:Error:line (1,160)cannot find symbol class ServiceDescriptorProto
Error:Error:line (1,059)cannot find symbol class EnumValueDescriptorProto
Error:Error:line (1,082)cannot find symbol class EnumValueOptions
Error:Error:line (1,085)cannot find symbol class EnumValueDescriptorProto
Error:Error:line (1,090)cannot find symbol class EnumValueDescriptorProto
Error:Error:line (1,198)cannot find symbol class MethodDescriptorProto
Error:Error:line (1,224)cannot find symbol class MethodOptions
Error:Error:line (1,227)cannot find symbol class MethodDescriptorProto
Error:Error:line (1,236)cannot find symbol class MethodDescriptorProto
Error:Error:line (235)cannot find symbol class FileDescriptorProto
Error:Error:line (236)cannot find symbol variable FileDescriptorProto
Error:Error:line (370)package DescriptorProto does not exist
Error:Error:line (534)package FieldDescriptorProto does not exist
Error:Error:line (539)package FieldDescriptorProto does not exist
Error:Error:line (544)package FieldDescriptorProto does not exist
Error:Error:line (658)package FieldDescriptorProto does not exist
Error:Error:line (659)package FieldDescriptorProto does not exist
Error:Error:line (660)package FieldDescriptorProto does not exist
Error:Error:line (661)package FieldDescriptorProto does not exist
Error:Error:line (662)package FieldDescriptorProto does not exist
Error:Error:line (663)package FieldDescriptorProto does not exist
Error:Error:line (664)package FieldDescriptorProto does not exist
Error:Error:line (665)package FieldDescriptorProto does not exist
Error:Error:line (666)package FieldDescriptorProto does not exist
Error:Error:line (667)package FieldDescriptorProto does not exist
Error:Error:line (668)package FieldDescriptorProto does not exist
Error:Error:line (669)package FieldDescriptorProto does not exist
Error:Error:line (670)package FieldDescriptorProto does not exist
Error:Error:line (671)package FieldDescriptorProto does not exist
Error:Error:line (672)package FieldDescriptorProto does not exist
Error:Error:line (673)package FieldDescriptorProto does not exist
Error:Error:line (674)package FieldDescriptorProto does not exist
Error:Error:line (675)package FieldDescriptorProto does not exist
Error:Error:line (700)package FieldDescriptorProto does not exist
Original issue reported on code.google.com by [email protected]
on 9 Jul 2008 at 1:53
It would be nice if protobuf would use an already installed gtest instead
of it's own bundled version.
Furthermore it might be a good idea to make it configurable whether the
unittests are being built automatically or not.
The attached patch introduces two new configure options:
--disable-unittests and --with-system-gtest which allow that.
If not specified the behaviour is the same as without the patch (so default
is to build unittests and to use the bundled version of gtest).
"make check" will of course build the unittests even if --disable-unittests
was used.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2008 at 12:15
Attachments:
What steps will reproduce the problem?
1. download any of the presented archives (except win32 one)
2. ./configure, make install
What is the expected output? What do you see instead?
Expected to have protocol buffers installed, got that in output:
486-linux-gnu/4.2.3/../../../../lib/crtn.o -pthread -pthread -Wl,-soname
-Wl,libprotoc.so.0 -o .libs/libprotoc.so.0.0.0
/usr/bin/ld: cannot find -lprotobuf
collect2: ld returned 1 exit status
libtool: install: error: relink `libprotoc.la' with the above command
before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Exit from catalogue
`/home/alexe/downloads/proto2/protobuf-2.0.0beta/src'
make[2]: *** [install-am] Error 2
make[2]: Exit from catalogue
`/home/alexe/downloads/proto2/protobuf-2.0.0beta/src'
make[1]: *** [install] Error 2
make[1]: Exit from catalogue
`/home/alexe/downloads/proto2/protobuf-2.0.0beta/src'
make: *** [install-recursive] Error 1
What version of the product are you using? On what operating system?
The presented version, Ubuntu 8.04 (Hardy)
Please provide any additional information below.
tried to do that:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
also tried to run ./configure with --prefix=/usr
That didn't help.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2008 at 5:11
Windows XP and WinCE platform uses w_char as the default string format.
protobuf should support both "string" and "wstring" type. Then it's very
convenient for developers to decide which type of string should be used.
No need string format conversion any more.
Original issue reported on code.google.com by [email protected]
on 22 Jul 2008 at 10:07
As has been pointed out elsewhere, binary protocol messages are not
completely self-descriptive (names missing, wire type overloaded). Generic
code to pretty-print, query, generate code from or otherwise handle
protocol messages needs access to the descriptors. Instead of building code
for every language to parse .protos at runtime, serialized descriptor
messages seems the right thing to handle.
This patch adds an --output_desc code generator to protoc that simply
serializes the parsed FileDescriptorProto for further consumption.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2008 at 9:13
Attachments:
Is there any chance that C bindings could be written? I guess those
wouldn't have an OOP design, but structs plus some global functions seem to
be an option to me.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2008 at 10:26
What steps will reproduce the problem?
1. ./configure --prefix=/usr
2. make
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
2.0.2, Fedora 9, x86_64, gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)
Please provide any additional information below.
(cd .libs && rm -f libprotoc.la && ln -s ../libprotoc.la libprotoc.la)
/bin/sh ../libtool --tag=CXX --mode=link g++ -pthread -Wall -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -g -O2 -pthread -o protoc main.o
libprotobuf.la libprotoc.la
g++ -pthread -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
-g -O2 -pthread -o .libs/protoc main.o ./.libs/libprotobuf.so
./.libs/libprotoc.so
creating protoc
./protoc google/protobuf/unittest.proto
google/protobuf/unittest_import.proto google/protobuf/unittest_mset.proto
google/protobuf/unittest_optimize_for.proto
google/protobuf/unittest_embed_optimize_for.proto
google/protobuf/unittest_custom_options.proto
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto -I. --cpp_out=.
lt-protoc: ./google/protobuf/stubs/common.h:274: To
google::protobuf::internal::down_cast(From*) [with To = const
google::protobuf::UninterpretedOption*, From = const
google::protobuf::Message]: Assertion `f == __null || dynamic_cast<To>(f)
!= __null' failed.
Original issue reported on code.google.com by [email protected]
on 3 Oct 2008 at 7:58
What steps will reproduce the problem?
1. Create a new VC++ project in Visual Studio, include <windows.h> in your
stdafx.h - as is normal.
2. Include your protoc generated .cc files in any cpp file that also
includes stdafx.h
3. Compile
What is the expected output? What do you see instead?
It is expected that this will compile and link, but you get an error that
reads:
1>mycpp.obj : error LNK2001: unresolved external symbol "public: virtual
class google::protobuf::Message const & __thiscall
google::protobuf::internal::GeneratedMessageReflection::GetMessageW(class
google::protobuf::Message const &,class google::protobuf::FieldDescriptor
const *)const " (?
GetMessageW@GeneratedMessageReflection@internal@protobuf@google@@UBEABVMess
age@34@ABV534@PBVFieldDescriptor@34@@Z)
The Issue:
You will notice that the linker is looking for GetMessageW(), which
doesn't exist. This is due to winuser.h including the following lines:
#ifdef UNICODE
#define GetMessage GetMessageW
#else
#define GetMessage GetMessageA
#endif // !UNICODE
The solutions:
There are several solutions for this, such as:
- Renaming GeneratedMessageReflection::GetMessage() to something that
doesn't conflict with an MS macro
- using #undef to kill the MS macro at the top of
generated_message_reflection.h ... which isn't great since it prevents the
proper use of the MS GetMessage() in any source file that also uses
ProtoBuf
- Requiring that all protobuf files be included in source files that
don't make use of windows.h ... which is easy, but not ideal.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2008 at 11:31
Given some proto file, a.proto, 'cd' to the directory containing a.proto
and execute the command
protoc "--cpp_out=c:/" a.proto
This should write output files to the root directory of the C: drive.
Instead, the tool outputs the following error message:
--cpp_out: Unknown generator option: c
This is with version 2.0.0 of the tool, on Windows XP SP2.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2008 at 1:37
What steps will reproduce the problem?
1. Use the distributed protoc.exe to compile a message file
2. On the command-line, specify an include path (-I=x) or an output path (-
-cpp_out=x) where the path ("x") ends with a '\' (as is common in Windows).
3. Notice protoc.exe complain that the path specified is not valid.
What is the expected output? What do you see instead?
It is expected that protoc.exe treats paths that end with a backslash the
same as paths that omit the backslash. ... Instead, and error is returned
when a backslash is used.
Please provide any additional information below.
The fix for this is quite easy, as it simply involves stripping any
trailing backslash prior to calling access() - since access() is the
function that doesn't properly allow backslash chars.
This is needed in two spots inside of command_line_interface.cc:
-----------------------------------------
Near line 468, you will find this code:
-----------------------------------------
// Make sure disk path exists, warn otherwise.
if (access(disk_path.c_str(), F_OK) < 0) {
cerr << disk_path << ": warning: directory does not exist." <<
endl;
}
-----------------------------------------
Before the above block of code, add this block:
-----------------------------------------
#if defined(_WIN32) && !defined(__CYGWIN__)
// On windows, remove any trailing slash since access() doesn't
allow them
if (disk_path[disk_path.length() - 1] == '\\')
disk_path.erase(disk_path.length() - 1, 1);
#endif
-----------------------------------------
Near line 528, you will find this code:
-----------------------------------------
output_directives_.push_back(directive);
-----------------------------------------
Before the above line of code, add this block:
-----------------------------------------
#if defined(_WIN32) && !defined(__CYGWIN__)
// On windows, remove any trailing slash since access() doesn't allow
them
if (directive.output_location[directive.output_location.length() - 1]
== '\\')
directive.output_location.erase(directive.output_location.length
() - 1, 1);
#endif
-----------------------------------------
Clearly, these two new blocks of code are identical and could (and
probably should) be added as a function that strips the trailing backslash.
Original issue reported on code.google.com by [email protected]
on 21 Aug 2008 at 9:54
What steps will reproduce the problem?
1.
adding two enums with same value name in proto file...
eg.
enum Source
{
NONE=0;
SRC1=1;
}
enum Foo
{
NONE=0;
BAR1=1;
}
3.
What is the expected output? What do you see instead?
Expected to compile successfully, but got "NONE" is already defined in
proto error
What version of the product are you using? On what operating system?
2.0.0Beta, windows
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2008 at 3:59
Could it be possible to support Windows CE (Smartphone) platform?
I'm just trying to port the source code to Windows Mobile 6 platform
today, but encountered some problem. It would be wonderful if Google could
provide official support for WinCE.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2008 at 8:16
Adding this as an issue ...
The C++ code generator has a small bug that produces code that
produces warnings on some compilers when the -pedantic flag is
enabled. In particular, when an enum definition ends in a trailing
comma, a warning is thrown. Here is a patch to fix the small bug.
diff -u for /src/google/protobuf/compiler/cpp/cpp_enum.cc:
--- cpp_enum.cc 2008-08-26 10:57:59.000000000 -0400
+++ cpp_enum.cc.bak 2008-08-26 10:58:16.000000000 -0400
@@ -57,7 +57,14 @@
vars["prefix"] = (descriptor_->containing_type() == NULL) ?
"" : classname_ + "_";
- printer->Print(vars, "$prefix$$name$ = $number$,\n");
+ const char* enum_output;
+ // A trailing comma is a pedantic warning on some C++ compilers
+ // and so we ensure that no trailing slash is present
+ if (i != (descriptor_->value_count() - 1))
+ enum_output = "$prefix$$name$ = $number$, \n";
+ else
+ enum_output = "$prefix$$name$ = $number$\n";
+ printer->Print(vars, enum_output);
if (descriptor_->value(i)->number() < min_value->number()) {
min_value = descriptor_->value(i);
Original issue reported on code.google.com by [email protected]
on 9 Oct 2008 at 6:41
What steps will reproduce the problem?
1. Install Python 2.6
2. Run Python interpreter
3. import google.protobuf.descriptor_pb2
What is the expected output? What do you see instead?
There should be no output on a successful import of this code, but instead
this error occurs:
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import google.protobuf.descriptor_pb2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...\lib\site-packages\google\protobuf\descriptor_pb2.py", line 737,
in <module>
class FileDescriptorSet(message.Message):
File "...\lib\site-packages\google\protobuf\reflection.py", line 141, in
__init__
superclass.__init__(cls, name, bases, dictionary)
TypeError: Error when calling the metaclass bases
type.__init__() takes 1 or 3 arguments
What version of the product are you using? On what operating system?
Protocol Buffers 2.0.1 on Windows XP SP3 with the Python 2.6 final release.
Please provide any additional information below.
The attached patch allows the code to import successfully, but it may not
work correctly at run time.
Original issue reported on code.google.com by [email protected]
on 7 Oct 2008 at 2:49
Attachments:
Unfortunately, you can't use this within a C# or a VB.Net project. May I
ask for a .Net release?
Original issue reported on code.google.com by [email protected]
on 10 Jul 2008 at 11:35
What steps will reproduce the problem?
1. create a C file
2. in main, type:
tutorial::Person* person;
person->set_email("here");
3. direct the Makefile to -I/$HOME/protobuf-2.0.0beta/src/ \
-I/$HOME/protobuf-2.0.0beta/examples/
4. compile
What is the expected output? What do you see instead?
Expected output is a compiled program, but i receive:
In function `tutorial::Person::set_email(char const*)':
$HOME/protobuf-2.0.0beta/examples/addressbook.pb.h:457: undefined reference
to `tutorial::Person::_default_email_'
collect2: ld returned 1 exit status
What version of the product are you using? On what operating system?
libprotoc 2.0.0
Suse
Please provide any additional information below.
This is the created program out of the box. Also, i am able to set bool and
sint32 because there is no function to check the default like this:
if (email_ == &_default_email_) {
email_ = new ::std::string;
}
This occurs with both string and bytes.
And this seems strange because I can't find anyone else having this problem
on the web, so please help.
Original issue reported on code.google.com by [email protected]
on 18 Jul 2008 at 2:18
Configure and type make on a solaris 10 system.
Even with the -library=stlport4 flag compilation fails.
Original issue reported on code.google.com by [email protected]
on 22 Jul 2008 at 3:55
What steps will reproduce the problem?
On Tru64 V5.1B with the cxx compiler V6.5-014 (and this is the same for
the newest compiler, V7.1) the protobuf cannot compile and work because it
doesn’t have the HASH_MAP and the HASH_SET
What is the expected output? What do you see instead?
I would like to "merge" this patch in the project.
I used the slower "std::map" and the std::set to make this project work on
system than don't include the hash_map and the hash_set.
==> stlport is not the answer to this problem...
What version of the product are you using? On what operating system?
So again, Tru64 V5.1b and the cxx compiler v6.5
==> I have a patch that work (tested on Windows Visual Studio Microsoft
2005, and on Tru64) that use map/set instead of hash_map/hast_set.
It is base on the revision 33 of the svn source file directory.
What I did (in the hash.h):
- Modified the "stubs\hash.h" to include the "fake_hash.h" when the
HAVE_HASH_MAP and the HAVE_HASH_SET are not define
- Created "stubs" on the struct hash_map and the hash_set to use the map
and the set.
-The map doesn’t have the "HashFcn : hash<Key>" so, in the template
definition, the HashFcn is replaced by something else :
std::less<Key>. This hack is only to not change to much code in the
description.cc, but you can do something better.
What I did (in the description.cc where the fake_hash are used):
-Map are based on "StringLess" not "StringEqual" so:
- two new struct to deal with this :
CStringLess (for CStringEqual),
PointerStringPairLess (for PointerStringPairEqual)
- With #if HASH_FAKE, force the SymbolsByNameMap, SymbolsByParentMap
to use the CStringLess and the PointerStringPairLess
- Because I use the ugly "hack" that keep the same template on the Struct
Hash_map and the HASH_SET, the FieldsByNumberMap definition and the
EnumValuesByNumberMap (and others) are the same...the hash function is
ignored so it's work.
What I did (in the printer.cc/.h where a map is used):
-The link does not work
For some reason, it try to find the symbol google::protobuf:map
instead of the std::map, so i put the std:: in from of the declaration
Print(const std::map<string, string>& variables, const char* text)
=====
==> To test on Microsoft Visual Studio (2005 and 2008)
Uncomment the following line in the stubs\hash.h.
//#undef HAVE_HASH_MAP
//#undef HAVE_HASH_SET
So please, try to integrate this (on something based on this).
and if this is in the next release, that will be very good.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2008 at 3:28
Attachments:
The current 2.0.0beta package I tried uses a huge package called maven to
install the java side. Wouldn't it be a far better idea to use something
like ant instead? On my machine, which already has quite some parts of java
already, I had to install 137 (!) extra packages to be able to compile the
java part of this otherwise great project.
Therefore, I stopped bothering and just built it manually. The result is an
ebuild (gentoo package format) which essentially executes the building
commands by itself, instead of being able to just do a generic "build this
package" call.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2008 at 10:25
Lines 9-15 appear to be referencing Google-specific files and practices.
Original issue reported on code.google.com by [email protected]
on 11 Aug 2008 at 10:53
The Java implementation of protobuf makes extensive use of syntactical
features of the Java language which are not supported in the _mobile_
version of Java, aka. JME. (Java5 enums and other stuff for example). This
renders protobuf completely useless for the JME developer world and that's
something I'm really sad about. Developing in a hybrid .NET/JME environment
and knowing that a C# port of protobuf is coming, I got really interested
in the protobuf+j2me issue, but couldn't find any ongoing discussion about
it (multiple google and groups searches returned no results), so I'd like
to ask whether:
1. You are planning to implement protobuf (or a subset of) in JME
2. You know about anyone already working on this
3. You know about forum threads, groups, etc. on this topic.
4. I am allowed to start implementing protobuf for JME.
Thanks in advance.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2008 at 8:39
What steps will reproduce the problem?
1. Subclass a generated service class
2. Overload a service method
3. Try to call the method with CallMethod
What is the expected output? What do you see instead?
Expected output is the one of the method call.
Instead we got:
Method not implemented.
What version of the product are you using? On what operating system?
Last SVN version (r2) on GNU/Linux
Please provide any additional information below.
Attached patch add a test case to reproduce the issue, and fix the problem
by changing the first parameter of getattr call in _CallMethod from
generated service class, to subclassed service instance.
Please not that the patch is released in the public domain
Original issue reported on code.google.com by [email protected]
on 13 Jul 2008 at 2:32
Attachments:
What steps will reproduce the problem?
1. Using the distributed protoc.exe, try to compile a .proto file
2. Specify a full path (drive letter included, such as "d:\bla" for the --
cpp_out param.
3. Notice the complaint that "d" (or whatever drive letter specified) is
not a valid "generator option".
What is the expected output? What do you see instead?
Full paths that include drive letters should be supported, but instead an
error is given.
Please use labels and text to provide additional information.
The fix to this seems to be on line 507 of command_line_interface.cc.
This line hardcodes ":", when it should actually be using kPathSeparator.
Line 507 Currently Reads:
SplitStringUsing(value, ":", &parts);
Line 507 Should Read:
SplitStringUsing(value, kPathSeparator, &parts);
Original issue reported on code.google.com by [email protected]
on 21 Aug 2008 at 9:17
As explained at
http://groups.google.com/group/protobuf/browse_thread/thread/6a8966943d249ce9,
some libraries seem to be missing on starting protoc. An installation with
checkinstall instead of make install is impossible because it also
complains about missing libraries.
Using protobuf-2.0.0beta on Ubuntu 8.04, 64-bit.
Original issue reported on code.google.com by dominik.mayer
on 8 Jul 2008 at 7:03
What steps will reproduce the problem?
1. download protobuf-2.0.0beta.tar.gz
2. extract java files, get some .java
3. compile with eclipse ,jdk6
What is the expected output? What do you see instead?
expected success.
but it says "com.google.protobuf.DescriptorProtos.*" imported in
Descriptors not found.
What version of the product are you using? On what operating system?
protobuf-2.0.0beta.tar.gz , win-xp
Please provide any additional information below.
searched all .gz, no other java or jar files
Original issue reported on code.google.com by [email protected]
on 9 Jul 2008 at 3:24
Hi!
Two problems:
table.pb.cc: In copy constructor 'drizzle::Table_Field::Table_Field(const
drizzle::Table_Field&)':
table.pb.cc:221: warning: base class 'class google::protobuf::Message' should
be explicitly
initialized in the copy constructor
and...
table.pb.h:49: error: comma at end of enumerator list
(AKA you are putting a comma at the end of your generated enum list).
Cheers,
-Brian
Original issue reported on code.google.com by [email protected]
on 12 Aug 2008 at 10:58
Hi!
When we included a proto header into Drizzle (http://launchpad.net/drizzle) we
ended up with the following catch-22:
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/Users/gmax/usr/local/drizzle\""
-DDATADIR="\"/Users/gmax/usr/local/drizzle/var\""
-DSHAREDIR="\"/Users/gmax/usr/local/drizzle/share/drizzle\"" -
DPLUGINDIR="\"/Users/gmax/usr/local/drizzle/lib/drizzle/plugin\""
-DLOCALEDIR=\"/Users/gmax/usr/local/drizzle/share/locale\" -DHAVE_CONFIG_H -I.
-I.. -I.. -I.. -I/opt/local/include/ -I/opt/local/include -W -Wall -Wextra -
pedantic -Wundef -Wredundant-decls -Wno-long-long -Wno-strict-aliasing
-fno-exceptions -fno-rtti -ggdb3 -O3 -MT sql_db.o -MD -MP -MF
.deps/sql_db.Tpo -c -o sql_db.o sql_db.cc
../drizzled/structs.h: In member function ‘void
Discrete_interval::replace(uint64_t, uint64_t, uint64_t)’:
../drizzled/structs.h:273: error: ‘UINT64_MAX’ was not declared in this
scope
../drizzled/structs.h: In member function ‘bool
Discrete_interval::merge_if_contiguous(uint64_t, uint64_t, uint64_t)’:
If we define stdint.h before we include proto's headers and define
__STDC_LIMIT_MACROS, protos spits out errors on compile as well.
Cheers,
-Brian
Original issue reported on code.google.com by [email protected]
on 12 Aug 2008 at 10:56
I've downloaded the latest source and did a:
./configure && make && make test
And I got the following error:
./protoc google/protobuf/unittest.proto google/protobuf/unittest_import.proto
google/protobuf/unittest_mset.proto google/protobuf/unittest_optimize_for.proto
google/protobuf/unittest_embed_optimize_for.proto
google/protobuf/unittest_custom_options.proto
google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto -I. --cpp_out=.
lt-protoc: ./google/protobuf/stubs/common.h:274: To
google::protobuf::internal::down_cast(From*) [with To = const
google::protobuf::UninterpretedOption*, From = const
google::protobuf::Message]: Assertion `f
== __null || dynamic_cast<To>(f) != __null' failed.
make[2]: *** [unittest_proto_middleman] Aborted
make[2]: Leaving directory `/tmp/protobuf-2.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/protobuf-2.0.2'
make: *** [all] Error 2
Original issue reported on code.google.com by [email protected]
on 9 Oct 2008 at 6:35
I had a bug in my program using a similar proto:
message NameProto {
required string text = 1;
// in UTF-8
optional string language = 2;
// http://www.rfc-editor.org/rfc/bcp/bcp47.txt
}
message FooMessage {
repeated NameProto name = 2;
}
foo = FooMessage()
foo.name.text = "contents"
which didn't raise an exception.
http://code.google.com/apis/protocolbuffers/docs/pythontutorial.html claims
it should.
http://code.google.com/apis/protocolbuffers/docs/reference/python-generated.html
doesn't say anything about AttributeError.
I haven't tried to repro in trunk, will try to get to it later if you don't.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2008 at 4:11
The C++ API has the following two functions: SerializeToOstream and
ParseFromIStream. Notice that in the former case, stream is uncapitalized
while in the latter stream is capitalized.
This is an incredibly minor issue, but would be nice to fix before
protobufs moves out of beta.
Original issue reported on code.google.com by jtolds
on 17 Jul 2008 at 9:40
What steps will reproduce the problem?
Cannot compile this project on Tru64 v5.1b with the cxx v6.5
What is the expected output? What do you see instead?
The following incompatibilities exist:
==> All the files that are describe here are included in the .7z file to
show what I did to made the project working on the Tru64 platform.
The cxx compiler has trouble with nested classes in anonymous-namespace
-- The following files included in this message show what to do in is case
(or use namespace "internal", or again, do not use nested classes in this
case):
cpp_unittest.cc
python_generator.cc
descriptor_unittest.cc
text_format_unittest.cc
The min function needed the inclusion of the <algorithm> header in the
file : zero_copy_stream_impl.cc
-The header <stdint.h> is non-existence is Tru64, use include <inttypes.h>
instead in the file : stubs\common.h
- the compiler complain with redefinition of symbol, so in the
file "stubs\strutil.cc", put "#undef isxdigit" and "#undef isprint" before
the declaration of these functions.
-for Tru64 "strtol" and "strtoul" are already 64 bit (long is 64 bit), and
the long long function "strtoll" and "strtoull" don’t exists, so
define "strtoll" to be" strtol" in the file: "\stubs\strutil.h"
-for Tru64, you cannot use "static_cast" on Label and Type, the compiler
complains.
So use the "description.cc" and the "descriptor_unittest.cc" files must
use something like this :
#ifdef __osf__ //static_cast on Label does't work on Tru64
proto->set_label((FieldDescriptorProto::Label)(label()));
proto->set_type((FieldDescriptorProto::Type)type());
#else
proto->set_label(static_cast<FieldDescriptorProto::Label>(label()));
proto->set_type(static_cast<FieldDescriptorProto::Type>(type()));
#endif
-There are so problem with the function "eof()" of a stream (eof is not
declared) so you must include the header <istream> and <ostream> in the
following file:
Message.h
-The "GenericRepeatedField" and the "RepeatedPtrField" cause a lot of
problem with the link. The symbol are not found when you execute "protoc"
The only way I found to do the work is to:
1-Declare the virtual ~GenericRepeatedField(){} inside the
header "repeated_field.h" instead of the "repeated_field.cc" file
2-Force inline in the declaration of the "Clear()" function of
the RepeatedPtrField
3-Declared the Specialization of the "Clear()" function inside
the header instead of the "repeated_field.cc" file.
4-Remove the "typedef typename reference", "pointer"
and "difference_type" inside the class "RepeatedPtrIterator" because they
already exists. (these redefinitions cause problem with cxx)
-The "protoc-test" don’t compile correctly because of the compiler have
problem matching symbol with the right template of the
FormatForFailureMessage.
- The only way it works is to : (in the gtest-internal.h ansd the
gtest.cc files)
-Use inline String FormatForFailureMessage(T& value) instead of
inline String FormatForFailureMessage(const T&
value)
- Remove the overloaded versions of the wchar_t type of the
FormatForFailureMessage function.
- Also, the compiler complains with the function "ForEach" inside
the "gtest.cc", the compiler cannot found the right Template, so I
put "#ifndef" in front of this call.
What version of the product are you using? On what operating system?
TRU64 v5.1B with the cxx compiler.
I give you the changes that I did to compile and execute correctly on this
system, please try to integrate the modification. With this and
the "hack" on the hash_map, hash_set, the project runs perfectly on Tru64.
To compile the following changes are included in the Makefile file.
==>The cxxflags must be : "-std ansi -model ansi -ieee "
You must also define "-D__USE_STD_IOSTREAM"
The –ieee is needed for the std::limites (without this, the function
return 0)
And the project must link with "–lm" (because the fabs symbol is not
found without this).
So in resume :
CXXFLAGS = -O -std ansi -compress -model ansi -ieee -underflow_to_zero –lm
DEFS = -DHAVE_CONFIG_H -D__USE_STD_IOSTREAM
Original issue reported on code.google.com by [email protected]
on 15 Aug 2008 at 6:43
Attachments:
What steps will reproduce the problem?
1. Compose a proto file:
message a { optional int32 a = 1; }
2. Compile the proto file into C++ code
What is the expected output? What do you see instead?
Expected: Compiler error.
Actual: the field a is defined as a constructor. The generated code cannot
compile.
What version of the product are you using? On what operating system?
2.0.1 on both windows/linux.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Sep 2008 at 4:12
Attachments:
`./setup.py test` fails:
File
"/Users/amosoi/workarea/britney/third-party/protobuf/python/google/protobuf/unit
test_mset_pb2.py",
line 6, in <module>
from google.protobuf import reflection
File
"/Users/amosoi/workarea/britney/third-party/protobuf/python/google/protobuf/refl
ection.py",
line 46, in <module>
from google.protobuf.internal import type_checkers
ImportError: cannot import name type_checkers
Original issue reported on code.google.com by [email protected]
on 13 Aug 2008 at 12:32
A minor issue. In the vsprojects, scoped_memory_log.h is specified
in "Header Files" of libprotobuf project, but it doesn't exist.
Original issue reported on code.google.com by [email protected]
on 26 Jul 2008 at 2:21
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.